how to sort the table for time . that is from 6.00 AM t0 10.00 PM
name source destination time
gokul xxx yyyy 10.00 PM
abc xxx yyyy 6.00 AM
I tried this query in side subquery still not working
Select * from (
Select * from trips where date = '27-09-2013'
and time like '%PM' or '%pm' ORDER BY time
) AND (
Select * from trips where date = '27-09-2013'
and time like '%AM' or '%am' ORDER BY time
) AS TIME
ORDER BY TIME(time) DESC'