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,
w
cancel this, found my problem :) this query worked:
SELECT * FROM subscribers ORDER BY acctid DESC LIMIT 1
Original Message
Subject: Query last record in table
Date: Mon, 05 Jul 2004 13:52:28 -0500
From: Mike Blezien <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Organi
At 13:52 -0500 7/5/04, Mike Blezien wrote:
Hello,
what is the most effecient way to query the last record in a table,
if querying the primary key(acctid) column ??
What do you mean by "last"? The row containing the largest acctid value?
You might try ... ORDER BY acctid DESC LIMIT 1.
I've tried "
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 :)
--
MikeBlezien
=-=-=-=-=-=-=-=-=-=-=-=