Results 1 to 4 of 4
Thread: for gurus....
Aug 19, 2002, 08:05 #1
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!
Aug 19, 2002, 08:08 #2
- Join Date
- Aug 1999
- Lancaster, Ca. USA
- 1 Post(s)
- 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..
Aug 19, 2002, 08:13 #3
using a mySQL database and PHP programming.rIGO
Aug 19, 2002, 18:33 #4
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