Re: Query select value on MAX Date
| From: | Neil Smith [MVP, Digital media] | Date: | Sat, 25 Feb 2006 23:10:51 +0000 |
| Subject: | Re: Query select value on MAX Date | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-41324@lists.php.net to get a copy of this message | ||
At 08:47 25/02/2006, you wrote:
MIME-Version: 1.0 Content-Type: multipart/alternative;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 - Neilboundary="----_=_NextPart_001_01C63997.1A6B1B7D"Date: Sat, 25 Feb 2006 08:07:36 +0900 Message-ID: <C5C91AD409136C4C8AA4A6593428DF6D0582F602@ijexch3.tpra.fmi.com> From: <Nur_Adman@fmi.com> To: <'php-db@lists.php.net'> Subject: FW: [PHP-DB] Query select value on MAX Date Dear All, Sorry, I wrote the wrong result.