Forum Moderators: coopster

Message Too Old, No Replies

Help making a search function

         

Acternaweb

4:38 pm on Dec 31, 2003 (gmt 0)

10+ Year Member



I have a "db" up and running now. It is not great but a good starter I guess. Anyway rather then having a user (namely myself) have to go through every category to find something can I do a simply search.

For example a query by name, team, etc. How would I get that done?

RussellC

5:46 pm on Dec 31, 2003 (gmt 0)

10+ Year Member



You can serch for a string with a query like this:

SELECT name FROM table WHERE name LIKE '%$searchtext%';

Make a form on one page with a input box and a drop down with your different categories, then when submit is pressed you can search with the query above and change the field depending on which category you select.