I have inserted multiple values from select statement in a single column using implode function. Now I want retrieve those values separately for my further queries. I have a student table in which I am storing their different area of interest in a single column using the implode function implode(',', $_POST['aoi']);. The structure of the table is like this:
id | Name | AOI
-------------------------------------------
101 | Paul | Hardware,Networking
102 | Fred | Finance,Insurance,Banking
Now I want to retrieve this student data separately based on their interest. I tried to extract data using explode function. But it is returning the data in array format.
And I have to extract area of interest separately. Can anybody tell me how to extract the single value from a column containing multiple value. So that I can execute my further queries.
Like $query = "select student.id,student.Name from student where AOI = 'Insurance'";
Thanks.
AOIas array and store values. But with MYSQL, you need to normalize the database.