var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Help with HOUR() query
I have a quick question.
In mySQL you can do the following, where messages.date is a datetime column:
I would like to select all columns from messages, where HOUR( date ) = 1 for example. How do I do this? Also, how would I issue a count?
SELECT HOUR( date ) AS time FROM messages;
ex in english:
"Select the column count AS total FROM messages WHERE HOUR( messages.date ) is 1"
Thanks in advance for your help.
what do you mean by "issue a count"? you mean a count of the number of rows that have the hour equal to 1? that would give you a one-row answer, and you can't get that at the same time as the columns
Originally Posted by Atari