Date: 01/15/06 (MySQL Communtiy) Keywords: php, mysql, sql i'm trying to select some data from a table. this bit i'm doing quite well with, however it's returning two rows per 'primary key' based on a left join. i've tried using DISTINCT but that doesn't seem to effect it. i then i tried using GROUP BY and that did, so now i'm getting the one row per primary key i was originally after, but i seem to be getting this data without the data of the left join i so desperately need. upon further investigation, back when i was getting two rows per primary key, only the second row per primary key had the data i was after. is their anyway to make sure the query returns the second row as opposed to the first?
|