I am using this code
$q = mysql_query("SELECT `time` from `table`");
$row = mysql_fetch_assoc($q);
$timeDiff = time() - $row['time'];
if ($timeDiff >= 86400){
//run code
}
but I am getting an error in the second line can someone please help me with this.