On Tue, Mar 4, 2008 at 11:24 AM, Esbach, Brandon
<Esbachb@stripped> wrote:
> Thanks for the reply,
>
> Sorry, should have been more specific on that :).
> I need to access the last record by date for each serial_number in the
> table (not just latest record)
Okay, this is untested, so I don't know if it will work
Out-Of-The-Box[tm] or not, but it should at least lead you in the
right direction. Plus, it's back on-list now, so that others can read
the results in the archives when they search on the web. ;-)
SELECT t.pass, t.id FROM theTable t WHERE t.serial_number IN
(SELECT DISTINCT serial_number,date FROM theTable ORDER BY date DESC
LIMIT 0,1);
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>