Jump to content

Searching for tags in mysql


etrader

Recommended Posts

I search for words in mysql by

 

mysql_query("SELECT * FROM Articles WHERE Tags LIKE '%$q%'", $con);

 

But I have problem with my tags as they are stored as "tag1,tag2,tag3". Now I want to get every article which contains "tag1"; but this does not work as LIKE %tag1% needs space to detect a word; though my tag list is comma separated.

Link to comment
https://forums.phpfreaks.com/topic/242433-searching-for-tags-in-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.