Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Handling Dates in Mysql BETWEEN AND

$
0
0

Hello,
 
I am trying to query my mysql database to return data based on a date range set.
 
here is the code that is returning an empty set.
 
The format is accepeted but will never return anything. Any help would be greatly appreciated.

SELECT * FROM (SELECT * FROM Live_Data WHERE uid='1' 'Post_Date' >= \"2013-11-21\" AND 'Post_Date' <= \"2013-11-22\" ORDER BY id DESC) tmp ORDER BY tmp.id ASC


or 



SELECT * FROM (SELECT * FROM Live_Data WHERE uid='$uid' 'Post_Date' BETWEEN '2013-11-21' AND '2013-11-22' ORDER BY id DESC) tmp ORDER BY tmp.id ASC

Viewing all articles
Browse latest Browse all 13200

Latest Images

Trending Articles



Latest Images