I must be a real dope 🙂
This is my complete query, still not deleting anything
are there any issues when comparing a timestamp with date();?
my code:
<?
$DBhost = "myHost";
$DBuser = "myUsername";
$DBpass = "myPassword";
$DBtable = "myTable";
$connect = @mysql_connect($DBhost, $DBuser, $DBpass);
$dbconnect = @mysql_select_db($DBName, $connect);
$date=date("YmdHis",mktime(date("H"),date("i")-15,date("s"), date("m"), date("d"), date("Y")));//this gives you the
current date and time - 15 minutes
$query = "DELETE FROM $dbtable WHERE dateAdded < $date";
$result = mysql_query($query);
?>