I have tried many times now but i just dont seem to be able to crack it!
I have set up a cron job on cpanel (was every minute for testing) with the command set at
/php cronjobcommand.php
In my cronjobcommand file i have the following code
<?php//conenct to your DB
$db_conn = mysql_connect('localhost', 'xxxxx', 'xxxxx');
mysql_select_db('xxxxx', $db_conn);
$result = mysql_query("DELETE FROM 'data'
WHERE 'offerends' < CURDATE()}
LIMIT 1", $db_conn);
//might want to check here to see if the query executed successfully
?>
I want it to delete any rows that have a date of less than today at midnight each night. what am I doing wrong? The job seems to find my file fine, i get my email without errors, but no difference to database.
Thanks Jamie.