View Full Version : Basic Search

03-27-2003, 10:19 PM
I've made a basic page using mySQL and PHP for a Tennis Site.

The person I'm making it for would like to add a search where they can search for a team name from a list or drop down if possible and get all the results from that team. That alone would be ok but if they could also search for season and league that would be even better! How can I do this?

Thanks for any help! :thumbsup:

03-27-2003, 10:20 PM
Just remembered something -

It would be searching the mySQL database :)

03-27-2003, 10:24 PM
Query the database for team names and populate a dropdown box from the query. When they select a team name use that value in your query to the database for the rest of the information.

As for searching by league and season, is this a completely separate search from the team? Or did you mean....Find this team and then filter by season and league?

03-27-2003, 10:37 PM
Sorry - just realised I put this in the PHP forum, I meant to put it in the mySQL one! But anyway now I'm here :o

We just had a quick rethink - this is plan two

We need to be able to search for Team but NOT Division together with Season but NOT League.

So people can search for Mens II (the Team) and Winter '00 (the season) and get the results for them. If they want they can just search for Mens II but they'll get about 5 sets of results.

Please make it as simple as you can as I'm still new to this stuff. Thanks for your help!

03-28-2003, 04:44 AM
hmmm i could write up a little script for you... um do youhave a mysql database and if so please tell me the table name and all of its column names please and tell me what each is ill get it for ya!!! lol i think... no im JK i will than btw for letting me hopefully

03-28-2003, 02:52 PM
Thanks stoodder :D

It's currently a database called kailyn_tennis and has a table called results in it.

Thanks! If you need to know anything else you can either post here or drop me an email at vprince@NOSPAMbtinternet.com, obviously remove the NOSPAM :)

Thanks again ;)

03-28-2003, 02:53 PM
Oh yes and columns, in this order -

id, date, league, season, team, division, opponent, outcome, score, ip :)