* Soheil Shaghaghi
> Hello everyone,
> I need help with MySQL coding in php please if anyone can help.
I can try. :)
> I have 3 tables:
> -users, where the user info is stored.
> -awards: contains the list of all the awards for each user
> -award_types: contains different types of award
> The tables are at the bottom of the page.
>
> What I need to do is look at these tables when a user id is being
> viewed and display the awards image that the user has won.
> A user can have multiple awards.
Ok... and what is the problem?
The SQL could be something like this:
SELECT award_type, award_image
FROM award_types,awards
WHERE
award_types.id = awards.award_id AND
awards.chosen = 'enabled' AND
awards.user_id = $userid
(Not sure about the chosen = 'enabled', just looked like that was what you
wanted from your example data.)
--
Roger
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]