Re: Emptying mySQl database on time-based factor!!!

From: Date: Fri, 24 Nov 2000 18:57:40 +0000
Subject: Re: Emptying mySQl database on time-based factor!!!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27003@lists.php.net to get a copy of this message
Not with just MySQL -- It doesn't have fancy triggers and timing stuff like that. You could write a crontab PHP script to do it. Add a timestamp column to each table, and simple have a series of: $query = "delete from blah where update + '@ 2 hours' <= now() and name = 'criteria'"; mysql_query($query); You may need to read up on cron/crontab: man cron man 5 crontab man 8 crontab (8? maybe not 8. See the "See Also" in the other entries) ----- Original Message ----- From: "Thomas Edison Jr." <thomasedisonjr@yahoo.com> Newsgroups: php.general Sent: Friday, November 24, 2000 4:25 AM Subject: [PHP] Emptying mySQl database on time-based factor!!! > Can we set a time out for deleting entries in the > mySQl databased on a certain criteria?? This may sound > akward maybe... but let's see this... > > Someone's been entering stuff into mySQL db. > He goes away.. and maybe after one or tw0 hours of his > dissapearing act..i would like records pertaining to > him from the table be deleted!! Taking maybe his name > into 'criteria'. > > Help Appreciated. > > > ===== > Rahul S. Johari (Director) > ****************************************** > Abraxas Technologies Inc. > Homepage : http://www.abraxastech.com > Email : abraxastech@yahoo.com > Tel : 91-4546512/4522124 > ******************************************* > > __________________________________________________ > Do You Yahoo!? > Yahoo! Shopping - Thousands of Stores. Millions of Products. > http://shopping.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#27003) next »