ahh.. i see what he means..
i should have 2 tables (games and members), and a third table that references the fields in the other two.
that way, i can just query the third table for exactly what i wanted in the first place? is that correct?
I also see the idea that Styx is suggesting.. in that i can (or should be able to) do it all in the query. i may have indeed been aproaching this the wrong way, by attempting to collect all the data via multiple queries, then use PHP to sort it out.. when i could possibly have collected it all directly as i needed it..
will go back and keep proding at it, see what i come up with..
*EDIT*
Styx.. thanks for the info, you were correct !!
if i run:
select g.GameName FROM members m,games g
WHERE Username='uname'
AND m.game1 = g.gameID;
I get returned exactly what i want, the username AND game name.. unfortunately as soon as i add another AND statement, it fails and returns an empty character set.. so appending:
AND m.game2 = g.gameID
it fails.. any ideas?
**EDIT**
Consider the case closed guys... THANKYOU to all
i had a look over your info styx, noted that you were using AND statements, should have been OR, so this is the query that worked for me:
SELECT m.Username,g.GameName FROM members m,games g
WHERE Username='uname'
AND (m.game1 = g.gameID
OR m.game2 = g.gameID
OR m.game3 = g.gameID
OR m.game4 = g.gameID
OR m.game5 = g.gameID);
need to be 1 AND, and then the OR statements in brackets.. as i said, i poked and proded until i worked it all out
thanks agian to everyone.
/tAK