Hello,
I have only one table with the following fields:
table name : visitcount
ip
time
lastvisit
visitcount
I want to delete the users record every 24 hours. What I do is block ip for further posting until 24 hours later.
I have the following but it doesn't work and I am sure you guys can figure out why:
Query fails every time. What am I doing wrong? Thanks.
I have only one table with the following fields:
table name : visitcount
ip
time
lastvisit
visitcount
I want to delete the users record every 24 hours. What I do is block ip for further posting until 24 hours later.
I have the following but it doesn't work and I am sure you guys can figure out why:
Code:
<?php include ('db.php'); //db connection $getDate = mktime (0,0,0,date("m") ,date("d")-1,date("Y")); $limitDate = date("Y-m-d", $getDate); $query = "DELETE FROM 'visitcount' WHERE 'lastvisit' = ' . $limitDate .' LIMIT 1"; $result = mysql_query($query) or die("Query Failed!"); ?>
Comment