How to select mysqli for tags search using php ?
I have table : test like this
___________________________________________
|_id_|_______name_______|________tag________|
| 1 | dog | animal,pet,dog |
| 2 | donuts | food,donuts |
| 3 | BMW | car |
| 4 | football | sport |
| 5 | ferrari | car,supercar |
and this is mysqli php code for select
$query = "SELECT * FROM test WHERE tag = '$_GET[tag]' order by id desc";
Then i test my code by this url
www.example.com/search_tag.php?tag=car
But it will show only row id 3
, how to select for show row id 3
and 5
?