Results 1 to 4 of 4
Thread: help to correct syntax
Dec 28, 2008, 11:06 #1
- Join Date
- Sep 2008
- 0 Post(s)
- 0 Thread(s)
help to correct syntaxCode MySQL:
"SELECT a.* , b.thumb_id , c.amount , ( SELECT COUNT(*) FROM listing_bid WHERE listing_id = a.id ) AS c_rows FROM listing a LEFT OUTER JOIN listing_photo b ON b.listing_id = a.id AND b.key = 1 LEFT OUTER JOIN listing_bid c ON c.listing_id = a.id ORDER BY c.id DESC LIMIT 1 WHERE a.activation = 1 ";
I want to get the highest amount so I put the ORDER BY clause in, its error.
So I need help to put the ODER clause correctly in the query.