[nycphp-talk] selecting/deleting all oldest entries in mysql.

Nasir Zubair lists at
Wed Mar 12 19:30:50 EST 2003

Thanks for the ideas Jim and Christopher Merlo. I'm trying them now.

- Nasir
-------Original Message-------
From: talk at
Date: Tuesday, March 11, 2003 8:18:32 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] selecting/deleting all oldest entries in mysql.
You could use a seq# for each person. When inserting the record do a select
on max seq# to obtain the highest # used for that individual, increment that
#, insert the new record, then delete where seq# <= newnumber - x and person
= logged in person.

Jim Hendricks, President, Biz Computing, Inc
Phone: (201) 599-9380 Email: jim at
Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford,
NJ 07646

----- Original Message -----
From: "Nasir Zubair" <lists at>
To: "NYPHP Talk" <talk at>
Sent: Monday, March 10, 2003 8:41 PM
Subject: [nycphp-talk] selecting/deleting all oldest entries in mysql.

> Hi all,
> I need to create a small logger, for our work place, that will log staff's
> IP addresses and host names. What I'm trying to do is to log last X
> to an online helpdesk, 24 for example.
> I'm having trouble coming up with a query to select/delete the oldest
> when a X+1st entry, (25th for the above number), is inserted.
> Can anyone hint me on how to go about doing it?
> - Nasir

--- Unsubscribe at ---

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMSTP.gif
Type: image/gif
Size: 494 bytes
Desc: not available
URL: <>

More information about the talk mailing list