NYCPHP Meetup

NYPHP.org

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

Nasir Zubair lists at ny-tech.net
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 nyphp.org
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
______________________________________________________________
Jim Hendricks, President, Biz Computing, Inc
Phone: (201) 599-9380 Email: jim at bizcomputinginc.com
Web: www.bizcomputinginc.com
Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford,
NJ 07646
______________________________________________________________

----- Original Message -----
From: "Nasir Zubair" <lists at ny-tech.net>
To: "NYPHP Talk" <talk at nyphp.org>
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
accesses
> to an online helpdesk, 24 for example.
>
> I'm having trouble coming up with a query to select/delete the oldest
entry
> 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 http://nyphp.org/list/ ---




. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030312/07e07b11/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMSTP.gif
Type: image/gif
Size: 494 bytes
Desc: not available
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030312/07e07b11/attachment.gif>


More information about the talk mailing list