How to pass NULL in where array for $wpdb->update


how to get results of a row with NULL element?
I have to update the row which contains only the post_id and the repeat value, ‘start’ and ‘end’ should be NULL

mysql table screenshot:

$wpdb->update( $schedule_table, array( 'rpt' => $event_tag ), array( 'post_id' => $post_ID, 'start' => NULL, 'end' => NULL ), array( '%s' ) );

I get this error:

WordPress database error: [] UPDATE wp_MW_3_schedule SET rpt = ‘monday’ WHERE post_id = 357 AND start = ” AND end = ”

Paul Geisler 4 months 0 Answers 18 views 0

Leave an answer