Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Sql statement help

$
0
0

Hi,

 

I'm working on a reset password for WordPress and I'm stumped on this query. What the query does is when a user requests a password reset, the query makes an update to the user's password and activation key.

 

When I run this query, it's giving me int(0) which is saying there are no rows affected. 

 

I ran a var_dump on each POST variables to check if the values are correct and it is, so I'm not sure where the error is coming from this sql statement.

$resetQuery = $wpdb -> query($wpdb -> prepare("UPDATE wp_users SET user_pass = %s, user_activation_key = '' WHERE user_login = %s AND user_activation_key = %s" 
, $hashedPwd , $usernameemail, $key));

If anyone can please assist me, that would be great!

-Halben


Viewing all articles
Browse latest Browse all 13200

Trending Articles