The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

MySQL 5.0.45 DESC does not reverse my posts ASC does (1 post)

  1. Tony Bianco
    Posted 8 years ago #

    Okay so apparently when I use do this on my localhost with the exact same mysql version I get the correct ordering:
    SELECT ID, post_title FROM sg_wp_posts WHERE post_type = 'post' ORDER BY post_date DESC LIMIT 10;

    I will get
    * My third post
    * My second post
    * My first post

    but when I do the same sql query on MySQL on my ubuntu vps I get this:
    * My first post
    * My second post
    * My third post

    Now if I change DESC to ASC then it works on my slice in that it shows the newest post first yet it does the opposite on my local machine.

    For some reason it's reversing the operation of DESC on my vps host. Anyone else see this happening?

    Also where is the query that is used on the front page to show the posts. I am having a hard time finding it.

Topic Closed

This topic has been closed to new replies.

About this Topic