|
Need help with a MySQL query
Here's the description of the query I need to make:
SELECT comments.*, user.user_dname (where user.user_id = comments.user_id), user.user_dname AS replyto_user_dname (where user.user_id = comments.replyto_user_id) FROM comments WHERE blog_id = bid
What I'm doing is selecting all comments made on a specific blog entry, and in each row I need to include the posters display name, and the display name of the person the poster is replying to. I was thinking I needed to perform some sort of JOIN, but then I'm not sure if I can perform conditional statements for specific fields? My brain hurts.
|