How to get INSERT errors from $wpdb?
To insert data you should use query() (documentation), get_var() method is for selecting data. If error is encountered, query() returns FALSE. query() This function returns an integer value indicating the number of rows affected/selected for SELECT, INSERT, DELETE, UPDATE, etc. For CREATE, ALTER, TRUNCATE and DROP SQL statements, (which affect whole tables instead of specific … Read more