i have created a script that randomly creates endtimes (of a race).
So like this :and so on for 5times (so till $endtime5).PHP Code:
Endtime1 is the endtime of horse nr 1
The endtimes are written in the database in the table 'horsescores'.
In horsenr the number of the horse (1-5)is written. In the endtime column the endtimes are written.
I now want to write the rank (depending on the endtimes, so the horse with the smallest endtime is the winner, etcetc untill the loser (5th).
How can i do this?
I thought about selecting all horses and order them by endtime with an sql query but i don't exactly now how i can save that ordering in ranknumbers.
And maybe there is a better way?
Thank you for you help