WordPress.org

Support

Support » Plugins and Hacks » Fatal Error: Call to a member function get_results() on a non-object

Fatal Error: Call to a member function get_results() on a non-object

  • skippix

    @skippix

    how do i get past this?

    <?php
    	require_once("wp-config.php");
    	require_once("wp-includes/wp-db.php");
    	header("Content-type: text/plain; charset=utf-8'\n\n\n");
    	$posts = $wpdb->get_results("select ID, post_title, post_author, date_format( post_date, '%m/%d/%Y %h:%i:%s %p' ), post_content, post_excerpt, post_status, comment_status, ping_status from $wpdb->posts order by ID asc;", ARRAY_N);

    thanks!

  • The topic ‘Fatal Error: Call to a member function get_results() on a non-object’ is closed to new replies.