I have 3 tables (applicable fields shown below):
members:
member_id, username
trivia:
trivia_id, num_questions
results:
trivia_id, member_id, score
I need a query that will return: the score and number of questions for a
given trivia, and the information I know is the member's username. Here's
the query I tried:
select m.member_id, t.num_questions, r.score FROM members AS m, trivia AS t,
results AS r WHERE m.username = 'username' AND r.trivia_id = 16 AND
r.member_id = m.member_id;
This returns invalid data, however. Can someone please help me out with this
query?
TIA,
Daren Cotter
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php