Support » Fixing WordPress » Need SQL Help!!

  • My SQL database has 0’s listed in the wp_posts/post_catagory fields.

    I am trying to modify this:

    <?php get_results(“SELECT ID,post_title FROM $wpdb->posts
    WHERE post_status= \”publish\” ORDER BY ‘ID’ DESC LIMIT “.$how_many);

    $how_many is a variable i defined earlier in the php script.

    I want to get info on posts from a specific category. so I need to basically change:

    WHERE ‘post_status’=\”publish\”


    WHERE ‘post_status=\”publish”\ AND (something else)

    But I dont know what the something else is, and need your help!!


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Need SQL Help!!’ is closed to new replies.