student
02-08-2007, 05:59 PM
hello,
i got another doubt,
as i have told you before i have a directory of websites in different categories.
when visitors search for some keyword, i have to search for it in titles, descriptions of websites.
the sql query is:
$sth = mysql_query("SELECT * FROM cb_urls WHERE title LIKE '%".addSlashes($keywords)."%' OR description LIKE '%".addSlashes($keywords)."%' ");
this query seaches all websites in all categories.
but i would like to search in only a particular category.
i have stored that category in a string $category.
now i want search results only in that particular category.
how can i do it.
thank you.
i got another doubt,
as i have told you before i have a directory of websites in different categories.
when visitors search for some keyword, i have to search for it in titles, descriptions of websites.
the sql query is:
$sth = mysql_query("SELECT * FROM cb_urls WHERE title LIKE '%".addSlashes($keywords)."%' OR description LIKE '%".addSlashes($keywords)."%' ");
this query seaches all websites in all categories.
but i would like to search in only a particular category.
i have stored that category in a string $category.
now i want search results only in that particular category.
how can i do it.
thank you.