Re: [PHP] Re: SELECTing a row by maximum value

2002-12-30 Thread Elna Moorhouse
Sorry, I forgot to add the group by clause. Both will work fine. "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You cannot mix grouping columns without a group by clause. This would work: > > SELECT * FROM MYTABLE order by ifield desc limit

Re: [PHP] Re: SELECTing a row by maximum value

2002-12-30 Thread Marek Kilimajer
You cannot mix grouping columns without a group by clause. This would work: SELECT * FROM MYTABLE order by ifield desc limit 1 Elna Moorhouse wrote: TRY: SELECT id,Max(ifield) from MYTABLE. What I don't understand is why you specify id=$id in the where clause. If you already specify the id