On Mon, Feb 25, 2008 at 1:39 AM, Zoran Bogdanov <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How can you perform a timed event in PHP; for example:
>
> Count 24 hours and then delete all rows in a database...
Once again, I say verily unto you: RTFM and STFW.
Linux/*nix: cron
Windows: at
Cron Example:
40 03 * * * `which php` /path/to/php/script.php
PHP:
<?
include('configure.php'); // With database connection stuff, et cetera.
$sql = "TRUNCATE TABLE `table_name`";
mysql_query($sql);
?>
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php