Hi Tia,

I'm not sure, but my old SQL trick was to do a "select * top 1 from
subscribers order by acctid desc"


Scotty.

-----Original Message-----
From: Mike Blezien [mailto:[EMAIL PROTECTED]
Sent: July 5, 2004 2:52 PM
To: MySQL List
Subject: Query last record in table


Hello,

what is the most effecient way to query the last record in a table, if
querying
the primary key(acctid) column ??

I've tried "select *,max(acctid) as lastid from subscribers where acctid =
'lastid' group by acctid"
but this returns nothing ??

TIA :)

--
Mike<mickalo>Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://thunder-rain.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to