At 08:47 25/02/2006, you wrote:
MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C63997.1A6B1B7D" Date: Sat, 25 Feb 2006 08:07:36 +0900 Message-ID: <C5C91AD409136C4C8AA4A6593428DF6D0582F602@xxxxxxxxxxxxxxxxxxxx> From: <Nur_Adman@xxxxxxx> To: <'php-db@xxxxxxxxxxxxx'> Subject: FW: Query select value on MAX Date Dear All, Sorry, I wrote the wrong result.
You've posted 3x with different results so it's too confusing to work out what you *want* to get.
However I woudl write that query like so : SELECT MAX(Date) as NewestDate, Value FROM table GROUP BY Category HAVING Date=NewestDate HTH Cheers - Neil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php