Forum Moderators: coopster
Thanks in advance for any help you can give me.
If the user is searching for text in a VARCHAR or CHAR field, use a LIKE clause in your MySQL:
select * from TABLE where Searched_Field LIKE '%$_GET[Keyword]%'
Don't forget to use the percent signs as they turn your WHERE clause into a subset, which is probably what you want anyway.
Bruce
You mentioned you had several tables, so let's say, for arguments sake, each ones is a category to the other. So you start with:
X1, X2, X3. They then lead to X11, X21, X31 and you can see what I'm getting at.
What you can do is get PHP to write the HTML for these search boxes and when a parent is picked by the user, using JavaScript such as script.aculo.us (http://script.aculo.us/), you can create a nice Js interface so that as the user clicks on a category, the relevant menu pops up next and so on. I hope that makes sense!