The following query works fine when not using a variable for the date&time. However, I would like to use a variable for "2014-09-29 09:00:00".
$query = ' SELECT *
FROM dateTime1
WHERE dateBooked="2014-09-29 09:00:00"';
(The "dateBooked" field is of datetime format.)
I below doesn't work:
$dateX = '2014-09-29 09:00:00';
$query = ' SELECT *
FROM dateTime1
WHERE dateBooked=' .$dateX;