Re: cant get LEFT JOIN to work properly when ORDER'ing BY
Posted by:
Toa Sty
Date: August 21, 2006 07:55AM
OK, so I'm not so hot at subqueries yet! :)
You could just do this instead:
SELECT * FROM paz_members m LEFT JOIN paz_images i ON (m.member_id = i.member_id AND
image_id = (SELECT image_id FROM paz_images i2 WHERE m.member_id=i2.member_id ORDER BY i2.img_main DESC LIMIT 1));
Hope your headache is going away. (I think you've transferred it to me now!)
Toasty
Edited 1 time(s). Last edit at 08/21/2006 08:00AM by Toa Sty.
Subject
Views
Written By
Posted
6845
August 20, 2006 01:36AM
8651
August 21, 2006 07:25AM
Re: cant get LEFT JOIN to work properly when ORDER'ing BY
4293
August 21, 2006 07:55AM
3182
August 22, 2006 03:25AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.