$wpdb->insert not working in any way

When $wpdb method doesn’t perform as it should it is likely issue with resulting SQL query (because of wrong input or something else).

Follow wpdb reference in Codex for troubleshooting:

  • enable database error display via $wpdb->show_errors()
  • check what query is being formed and run via $wpdb->last_query

Leave a Comment