Fix UPDATE query... again

My headache is getting worse from all this sql stuff...
This commit is contained in:
Arctic Code 2013-07-26 23:55:07 -05:00
parent 5aaec9e517
commit e80774a2bd

View File

@ -382,7 +382,7 @@ class api{
$salt = $password[1]; $salt = $password[1];
$password = $password[0]; $password = $password[0];
$sql = "UPDATE `logins` (`password`, `salt`, `iterations`) VALUES ('$password', '$salt', '$iterations') WHERE `email` = '$email';"; $sql = "UPDATE `logins` SET `password`='$password', `salt`='$salt', `iterations`='$iterations' WHERE `email` = '$email';";
if(!$result = $udb->query($sql)) return 'ERROR: ['.$udb->error.']'; if(!$result = $udb->query($sql)) return 'ERROR: ['.$udb->error.']';
return "Password changed"; return "Password changed";