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

Sort By Date

$
0
0

I am trying to sort by date my date posted format is the following 4/9/2013 -> Month / Day / Year

 

I am using the following query (I want to put the newest at top)

$mainQuery = "SELECT SQL_CALC_FOUND_ROWS * FROM `".TABLE_BLOG."` ORDER BY DATE(posted_date) DESC LIMIT ".(int)($perPage*($p-1)).','.(int)$perPage." ";

But it is not ordering correctly the information

 

Could anyone help me figure this out?


Viewing all articles
Browse latest Browse all 13200

Trending Articles