[solved] Tag based search does not scan multiple tags
Posted: Wed Aug 20, 2008 1:22 pm
Code: Select all
$db_select = "SELECT * FROM news WHERE news_tags='$tags' ORDER BY news.news_id ASC";A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$db_select = "SELECT * FROM news WHERE news_tags='$tags' ORDER BY news.news_id ASC";Code: Select all
// begins with
$db_select = "SELECT * FROM news WHERE news_tags LIKE '$tags%' ORDER BY news.news_id ASC";
// ends with
$db_select = "SELECT * FROM news WHERE news_tags LIKE '%$tags' ORDER BY news.news_id ASC";
// contains
$db_select = "SELECT * FROM news WHERE news_tags LIKE '%$tags%' ORDER BY news.news_id ASC";