I have a statement like this:
SELECT
CONCAT(DATE(`starttime`),' ',HOUR(`starttime`),':',LPAD(1*(MINUTE(`starttime`) DIV 1),2,'0'),':00') AS date
FROM
`times`
It’s the where clause that I am having trouble with because it has to be something like:
WHERE
`date` IN ('2011-06-05 11:00:00', '2011-06-05 12:00:00')
In this statement I correctly can’t use date as the WHERE clause because it doesn’t exist.
Does anyone know what I do instead?
Thanks in advance,
H.
1 Answer