At the end of the following code var_dump returns bool(false) in the browser. Just wondered if somebody could spot my error given that no entry exists at all (at present) in the mysql tb = “intervals”. Cheers.
//Connection code etc
$findinterval = mysql_query("SELECT * FROM intervals ORDER BY id ASC LIMIT 1");
if($findinterval == false){
$start_interval = "x";
} else {
$result = mysql_fetch_array($findinterval);
$start_interval = $result['start_interval'];
$start_interval->modify('+1 hour');
}
if($date>=$start_interval OR $start_interval == 'x'){
$insertinterval = mysql_query("INSERT INTO intervals VALUES ('','$date')")
var_dump($insertinterval);
//....
Try this
change this:
to: