Skip to:
Content
Pages
Categories
Search
Top
Bottom

WordPress Database Error when querying inside theme files?

  • Profile photo of perryroper
    PerryRoper
    Member

    @perryroper

    Hello,

    What I am trying to do is get data from my wordpress database based on the current buddypress user id. This is inside member-header.php inside /wp-content/themes/mytheme/members/

    http://pastebin.com/9ZHN7qHt

    I get the error on the http://mysite.tld/members/membername page:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘AND meta_key= ‘facebook_uid” at line 1]
    SELECT meta_value FROM wp_usermeta WHERE user_id = AND meta_key= ‘facebook_uid’

    I am using a very similar query in the header of my main wordpress theme files so the syntax shouldn’t be wrong.

    Any ideas on this would be greatly appreciated.

  • The topic ‘WordPress Database Error when querying inside theme files?’ is closed to new replies.
Skip to toolbar