Grapy :
Here is the code, I am updating col name custom_status
of wp_users
table for post data user email. Insert works fine, but the update query is not working.
Code Here:
if (isset($_POST["email_type"]) == 'News' ) {
$wpdb->update('wp_users', array('custom_status' => 'News'), WHERE, array('user_email' => $_POST["user_email"] ));
}
Thanks for the suggestions.
Dmitry :
You should add third argument which row you will update for example:
if (isset($_POST["email_type"]) == 'News' ) {
$wpdb->update('wp_users', array('custom_status' => 'News'), array( 'ID' => 1 ));
}
Hope help you.