It's not really, but kind of, a PHP question. I mean it is being written in PHP :)
I am putting together a search feature for our classified ads and there are about 4000
each day. Now I am bulding a query to search by newspaper, date, and keywords. One
last thing is categories.
Curious how others would handle this...on the search screen (and on the site) we have
broken down the classified codes into about 8-10 main groups (stuff like Merchandise,
Transportation, Services etc).
Now the problem is this: in the database, each ad goes in with it's class code which
matches up with the actual category. So instead of just Merchandise we have sub
categories like Christmas Trees.
There are close to 1500 class codeas and when I build this I need to allow the user to
select just one of the 8-10 codes and have the program return everything.
Will I need to do something like:
if $selection="Merchandise" then
{
select all ads where code="2" AND code="5" AND code="123" AND code="567" etc etc
}
Jeff