Hi Jenn,
There are a couple  ways you can do this.
You can write a unix shell script and run it periodically at the cron.
Here:

#!/bin/mysql

query="DELETE FROM tablename"

/usr/bin/mysql -u USER -pPASSWORD -D database -e "$query"


And then you can just put this script into cron, see:
http://www.faqts.com/knowledge_base/view.phtml/aid/1005/fid/436

Or you can do the same in the PHP script and call PHP script in command
line.. See the below links for this:

http://www.php.net/manual/en/commandline.php
http://www.phpbuilder.com/columns/darrell20000319.php3


Gurhan


-----Original Message-----
From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 2:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL, PHPand cron


Hi all,

Wondering if anyone might know how to empty a table with a php script and
cron job?
Would someone point me to a tutorial or help with this?

TIA
Jennifer



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to