How to search an array value, using GET method, to retrieve Data from database?
In other word, I have (prof_ids)
Stored in database like this: 1, 15, 52, All those three values are stored in one field. I have a link containing this (?prof_id=1)
for example and I want a query to search if the (prof_id)
value exists on (prof_ids)
field or not. and I have no Idea how to do it.
Is it possible to this?
$sql = $mysqli->query("SELECT * FROM profs WHERE prof_ids LIKE '%".$_GET[prof_id'']."%' ");
I sure my query will not get me the result I'm looking for, if any one please have any other solution can you please help me with this..