So as many already know the $wpdb class in WordPress can’t deal with inserts and updates involving NULL values. This is a major headache, and there doesn’t seem to be a good way around it.
So I’m wondering what the next best way is to insert/update tables in WordPress? I liked WPDB cause of the prepared statements, so I was hoping to have something where I could continue with that. Unfortunately, no PDO support?
Any suggestions?
Here is a solution for
Nullvalues, just create a newclassby extending thewpdbclass and use two newinsertandupdatefunctions and to do this you can create adb.phpfile in yourwp-contentdirectory and drop this content in the file.Not tested but you may give it a try.