Forums

WPDB custom query result vs phpmyadmin (1 post)

  1. sahanz
    Member
    Posted 1 year ago #

    Hello,

    I'm running a custom query using the WP_Query and it suppose to return one post,
    $post = new WP_Query( array('showposts'=>1, 'order'=>'DESC', 'post_type'=>'cmedia') );

    However this doesn't returns anything, 0 rows. I var_dumped this $post object got the actual SQL syntax that runs by WP_Query, gave it a shot in phpmyadmin and got one row result.

    Any idea why this happens?

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic