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