[RESOLVED] Select Order by starttime
When i use the following code
The result I get is the 12:00 pm displays before 9:00 am. I assume because 1 comes before 9. But I would like the Displays to show cronologically from morning to night.
$sql="SELECT * FROM forms ORDER BY starttime";
Sounds like starttime is some sort of character/text field, not a time, timestamp, or datetime field. The best solution would be to convert that column to an appropriate type. If that's not possible for some reason, then you would need to cast each one to one of those types within the query (which is pretty inefficient).
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)