I am not that good at PHP and i am stuck right now.
I have this code in one of my table rows in my db. Danish_English_Swedish. The data is from the table teacher.
I have this Query: $db->prepare("SELECT * FROM teacher WHERE subject = ? ORDER BY id DESC");
I have created an AJAX request which is called when a <select> is changed. This request is sent to a page that contains the above query. This select contains options as danish, english and swedish.
example:
If i select Danish in the <select> and a teacher has a row containing Danish_English_Swedish i want to grab the Danish from the data so it mathes the users request.
Maybe you can implode/explode and make it to an array and check it that way?
Any solutions are welcome!
FIND_IN_SET('Danish',REPLACE('_',',','Danish_English_Swedish'))in theWHEREpart of your select.