Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: Basic Search

  1. #1
    New Coder
    Join Date
    Mar 2003
    Location
    Somerset, UK
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Basic Search

    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!

  • #2
    New Coder
    Join Date
    Mar 2003
    Location
    Somerset, UK
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just remembered something -

    It would be searching the mySQL database

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #4
    New Coder
    Join Date
    Mar 2003
    Location
    Somerset, UK
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

    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!

  • #5
    Regular Coder
    Join Date
    Oct 2002
    Location
    Milwaukee, Wisconsin
    Posts
    123
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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

  • #6
    New Coder
    Join Date
    Mar 2003
    Location
    Somerset, UK
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks stoodder

    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

  • #7
    New Coder
    Join Date
    Mar 2003
    Location
    Somerset, UK
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh yes and columns, in this order -


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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •