$wpdb->insert not working. No Error Msg

后端 未结 4 866
陌清茗
陌清茗 2021-02-19 18:29

Got the lower portion here sorted, but now there\'s an issue when it inserts the record. I have the NULL value for file formatted as %s fo

4条回答
  •  抹茶落季
    2021-02-19 19:04

    Hopefully, you define global variable = $wpdb.

    If your $wpdb not working, and also not showing any error then you must try these three steps.

    1. Print your error using with errors functions.

      echo $wpdb->last_error;

      or

      echo $wpdb->show_errors();

    2. If no error visible then you must print your last query using with last query function.

      echo $wpdb->last_query();

    3. Copy and paste your last query in your Phpmyadmin > Your Database -> Table -> SQL tab, click on Go button, you will definitely get proper solutions(errors) in it.

    Thanks,

    Rocky Mehta.

提交回复
热议问题