$wsquery = array( 'faculty_id' => $uid);
$tid = array('id'=>1);
$tname = 'imtd_faculty_in_focus';
$wpdb->update( $tname, $wsquery , $tid);
This is my update code;
But evertime it returns Fatal error: Call to a member function update() on null
all values are set.
According to the error -$wpdb is undefined.
My guess is that you’re using this code in a function.
If this is the case, you should add the following line in order to use this class in your function:
So your code should look like: