$db_select = "SELECT * FROM news WHERE news_tags='$tags' ORDER BY news.news_id ASC";
This returns the entries that their news_tags row is equal to $tags variable. However if I search for "test" and the row's value is e.g. "test testing tech", it doesn't get listed.
Last edited by Sindarin on Sat Aug 30, 2008 4:05 am, edited 1 time in total.
// 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";