SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: for gurus....

  1. #1
    SitePoint Member rIGO's Avatar
    Join Date
    Jan 2002
    Location
    Malta
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    for gurus....

    i have a database with the following columns:

    id, datetime, venue, competition, hometeam, awayteam, homeresult and awayresult.

    basically it will have fields such as:

    1, 2002-01-11 15:00:00, Sliema, Div. 1, Sliema, Valletta, 2,0
    2, 2002-01-11 16:45:00, B'Kara, Div. 1, B'Kara, Hibs, 1, 1

    i want to get the info on the database to be viewed in a table according to the points obtained from every result. therefore if homeresult > awayresult then, hometeam gets 3 points and awayteam gets 0 points. if they equal they get a point each.

    the table must look like so:

    squad, games played, games won, games drew, games lost, goals in favour, goals against, goal difference, points

    the result using the fields shown above should be outputted like so:

    Sliema, 1, 0, 0, 2, 0, +2, 3
    B'Kara, 0, 1, 0, 1, 1, 0, 1
    Hibs, 0, 1, 0, 1, 1, 0, 1
    Valletta, 0, 0, 1, 0, -2, 0

    is there anyway of someone can instruct me on how to do it step by step; or someone creates the code and posts it or sends it over to me pls thanks a lot for the help!

    rIGO
    arrigo@onvol.net

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Specifying a database type and preferred scripting language may prove to be the difference between valid workable code and a mass of gibberish you can never understand. The solution will be very different in say Oracle or SQL server where it can all be done with Views and Stored Procedures as opposed to MySQL where all the collating has to be done in your scripting language of choice..
    Wayne Luke
    ------------


  3. #3
    SitePoint Member rIGO's Avatar
    Join Date
    Jan 2002
    Location
    Malta
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    using a mySQL database and PHP programming.
    rIGO

  4. #4
    SitePoint Member rIGO's Avatar
    Join Date
    Jan 2002
    Location
    Malta
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    got help from some other place....but still need loads more...

    i asked the questions there....probably u guys can answer them better...


    the link is the following

    http://www.sitepointforums.com/showt...threadid=72936

    pls do...


    thanks
    rIGO


Bookmarks

Posting Permissions

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