Re: need help figuring out how to delete rows?

From: Date: Sat, 23 Aug 2003 09:36:39 +0000
Subject: Re: need help figuring out how to delete rows?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-160490@lists.php.net to get a copy of this message
DELETE FROM table ORDER BY timestamp DESC LIMIT 40, 10000000 untested, but should work Deadsam wrote:
Hi Im making a chatroom using flash and php, the one problem Im having is deleting rows. What I'm looking for is when they click on the button to send the message into php-->mySql it will also check to see how many rows are in that table and if they are greater then 40, then to delete the rows over 40, starting with the oldest ones ASC. I thought about using the chatID number but that will change everytime. So I was thinking of having it check for how many rows there is if its greater then 40 rows then delete thgose over 40 ASC. Hope I explained it good enough :) Anyhow if anyone has a solution for this I would really appreciate it. Thanks in advance Deadsam


« previous php.general (#160490) next »