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
https://core.trac.wordpress.org/ticket/32315
One of the columns inputs may be larger than the column is. Wordpress detects this and will not even send the query to the DB.
The Diff there shows a patch for wp-db you can put in to get more information in the last_error message so it will not be empty.
If you want to get the last error and last query you can use this properties of $wpdb object:
$wpdb->last_error
will show you the last error, if you got one.
$wpdb->last_query
will assist you with showing the last query (where the error occurred)
I hope this will help you out.
Hopefully, you define global variable = $wpdb.
If your $wpdb not working, and also not showing any error then you must try these three steps.
Print your error using with errors functions.
echo $wpdb->last_error;
or
echo $wpdb->show_errors();
If no error visible then you must print your last query using with last query function.
echo $wpdb->last_query();
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.
Maybe your config hides error showing. Have you tried $wpdb->print_error();
?