• Resolved danieltj

    (@danieltj)


    I’m trying to pull data from a database and I’m getting the following error message:

    WordPress database error: [] SELECT user_id, meta_key, meta_value FROM wp_usermeta WHERE user_id IN (1) ORDER BY umeta_id ASC

    Is there a common mistake I’m making by getting this? What does error message mean exactly? Shouldn’t there be a value in the WHERE clause?

    edit

    Figured it out; was an issue with selecting the table in an array. Oops!

    Mods: please lock this.

    • This topic was modified 7 years, 1 month ago by danieltj. Reason: requested mod attention
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello Daniel,

    I don’t think there is anything wrong with the SQL query. Can you check the database table(wp_usermeta) exists? Maybe your WordPress installation uses some other prefix than “wp_”.

    Thread Starter danieltj

    (@danieltj)

    Thanks for the reply – I figured it out. It was an issue with an array index.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘$wpdb error when selecting user meta table’ is closed to new replies.