Truncate Table On Schedule How ??
- lmtips
-
lmtips
- Member since: Jun. 16, 2006
- Offline.
-
- Forum Stats
- Member
- Level 02
- Blank Slate
Ok i have a table which needs to be emptied every night at midnight GMT. I thought this would be easy to do by creating a PHP file with the databe logins etc and :
$sql = 'TRUNCATE TABLE `tb_ads_visit`';
However this didnt work. Does anyone know how you could make a PHP file Truncate a table when it loads?
As my server would scheduled to load a specific file at midnight GMT but i cannot figure out how to do it in the PHP file. According to the database manager this is how to do it but this seems wrong.
Any help would be greatly appreciated.
Thanks alot,
Lee Maclaughlan
- lmtips
-
lmtips
- Member since: Jun. 16, 2006
- Offline.
-
- Forum Stats
- Member
- Level 02
- Blank Slate
Figured it out guys so now need to help
Thanks
Lee Maclaughlan

