HELP:$wpdb->update only update only value.
-
global $wpdb; $db_name=$wpdb->someone; $id=5; $result =1; $note='Test note'; $data=array( 'is_success'=>$result, 'note'=>$note, 'success_time'=>date("Y-m-d H:i:s"), ); $where=array( 'id' => $id ); $format = array( '%d', '%s', '%s' ); $where_formart = array( '%d' ); $ok = $wpdb->update($db_name,$data,$where,$format,$where_formart);
I want to update 3 fields,but it only update the
'success_time'
field,and$ok
is true,why?
PS: all fields to be updated allow null.
Did you know?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘HELP:$wpdb->update only update only value.’ is closed to new replies.