[wp-hackers] Different MySQL queries return same result.

Paveo Chen p at owind.com
Thu Feb 28 17:52:18 GMT 2008


Hi, guys. I find a weird problem on MySQL query, the DESC and ASC return the same result.

The SQL is:

SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND
wp_posts.ID NOT IN ('') AND post_type = 'post' AND (post_status = 'publish'
OR post_status = 'private') GROUP BY wp_posts.ID ORDER BY post_date
*ASC*LIMIT 0, 10

SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND
wp_posts.ID NOT IN ('') AND post_type = 'post' AND (post_status = 'publish'
OR post_status = 'private') GROUP BY wp_posts.ID ORDER BY post_date
*DESC*LIMIT 0, 10

both 2 queries return a same result, my MySQL server is 5.0.51. And I test it in another 5.0.36 MySQL server that's no problem.
Any one point my the way to solve this issue?

The Bests,	
-Paveo



More information about the wp-hackers mailing list