|
SELECT c.*, u.user_dname, r.user_dname AS replyto_user_dname
FROM comments AS c, user AS u, user AS r
WHERE c.blog_id = bid, c.user_id = u.user_id, c.replyto_user_id = r.user_id
The query itself is pretty big since it needs to search in the user table twice.
|