No, Simon just e-bullies me. :'(
May've got that wrong.PHP Code:$time = date("H:i");
if($time == "00:00"){
$query = mysql_query("TRUNCATE TABLE `table_name` ;");
}
Printable View
No, Simon just e-bullies me. :'(
May've got that wrong.PHP Code:$time = date("H:i");
if($time == "00:00"){
$query = mysql_query("TRUNCATE TABLE `table_name` ;");
}
<?php
include "config.php"; // config file
$query = mysql_query("TRUNCATE TABLE `table_name` ;");
?>
go into cPanel.
Go to cron jobs, put the command as:
wget http://www.site.com/myfile.php
Then set the time to everyday at 00:00 of every week of every month of every year.
you set the cron to run the file at the time you want it delete and also
Simon why are u so up your self?
Just because someone else helped more then you.
Yeah, just ignore me. ('ere.)
I made it so that it deletes them, but also re adds them at the same time :)
Re-adds the table structure? That's exactly what TRUNCATE does, anyway :P