WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Custom Select Query Error Message

[Resolved] Custom Select Query Error Message

  • $querystr = "

    SELECT wposts.*
    `FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
    `WHERE wposts.ID = wpostmeta.post_id
    `AND wpostmeta.meta_key = ‘tag’
    `AND wpostmeta.meta_value = ’email’
    `AND wposts.post_status = ‘publish’
    `AND wposts.post_type = ‘post’
    `AND wposts.post_date < NOW()
    ` ORDER BY wposts.post_date DESC
    `”;

    `$pageposts = $wpdb->get_results($querystr, OBJECT);

    the part in bold produces error:

    “Fatal error: Call to a member function get_results() on a non-object in filepath.php : eval()’d code on line 11”

    anyone know why?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Custom Select Query Error Message’ is closed to new replies.