I’m trying to update the a field for my user with the code provided below according to http://codex.wordpress.org/wpdb#query_-_Run_Any_Query_on_the_Database
$wpdb->update($table, $data, $where);
Below you can see how I implemented it hoping it would work, but fails to do so. It just won’t change the email for user foobar like it needs to.
global $wpdb;
$wpdb->update('wp_usermeta',
array('email' => 'foo@bar.com'),
array('user' => 'foobar')
);
Any ideas?
1 Answer