Hi all,
I am trying to do quite a complex query with mysql and am needing some help.
I have got four columns that are important here;
L1crewid, L2crewid, L1prevraceid, L2prevraceid.
What happens is normally columns 1 and 2 would have values in them, and 3 & 4 would be blank. Some races however are dependent upon the results of previous races.
What i need to do is if the first 2 columns are populated then only those need to be displayed. If however only one of the first columns is selected and one of the second pair is selected, the query needs to get the result of the associated race and then display the winner into the associated column.
I can get this to work with PHP quite nicely, but need to do it in the mysql query if possible.
I hope this makes sense.
Thanks