Hello guys, I have a database where user registrations are recorded and I also have a field where the time is recorded when sign-up completed, the time looks like this 17:03:59 no am - pm. Now I need to sort them according to hours and count how many people have signed up for example @ 17 so where time starts with 17. Any idea? Thanks
The correct way to do that would be `WHERE HOUR(time)=17`. See the hour function at http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_hour.