Hi,
I am a complete newbie to MySQL so please forgive what is probably my sheer ignorance at this stage.
I have 2 tables..
Driver
PointsCode:id name r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 1 John 2 4 4 7 2 1 6 2 9 6
I would like to retrieve the points John gets for each of the 10 races he runs. The number in the r1, r2, r3 etc is the position he came in the race and he is awarded the points according to the id in the Points table. i.e. in Race 1 (r1) he came 2nd and so is awarded 9 points, in Race 2 (r2) he came 4th and so is awarded 7 points etc ... so the output would beCode:id pts 1 10 2 9 3 8 4 7 5 6 6 5 7 4 8 3 9 2 10 1
I'm sure it's got to be quite simple, but I'm having one of those days where I can't get my head around the simplest of things (must be because it's friday). Any pointers would be gratefully received. ThanksCode:Race Points 1 9 2 7 3 7 4 4 5 9 6 10 7 5 8 9 9 2 10 5
Jamie



I'd just like to ask whether it's likely that your points table will get additional records?


Bookmarks