How do I use $wpdb->insert with null values? I have a variable that sometimes is null and sometimes contains text.
How do I use $wpdb->insert with null values? I have a variable that sometimes is null and sometimes contains text.
has $wpdb->insert($wpdb->table, array('field' => 'NULL")); not worked?
I guess that's a know issue.
http://core.trac.wordpress.org/ticket/15158
For me it works omitting all values with null (in data and format), setting it to the mysql default value.
This topic has been closed to new replies.