I have recently learned how to join tables in queries with mysql.
But, like anything new, I am running into some problems.
I would like the results to be sorted by datetime, but for some reason they are sorted in random order. I have listed the queries that I am using below with a link to a page where you can see the results of each query.
s.date2 = (datetime) opening date
s.close = (datetime) closing date
Query: random order (joined)
FROM galleries g,shows s
g.gallery_id = s.gallery_id AND
UNIX_TIMESTAMP('".$today."') >= UNIX_TIMESTAMP(s.date2) AND
UNIX_TIMESTAMP('".$today."') <= UNIX_TIMESTAMP(s.close)
ORDER BY 's.date2'
Query: ordered by datetime (no join)
UNIX_TIMESTAMP('".$today."') >= UNIX_TIMESTAMP(date2) AND
UNIX_TIMESTAMP('".$today."') <= UNIX_TIMESTAMP(close)
ORDER BY 'date2'
Thank you for your time,