这些是我的代码:
$stmt1 = $mysqli->prepare("UPDATE users SET u_lpwd = ? WHERE u_id=? LIMIT 1");
$stmt1->bind_param("si", $pwd, $uid);
$stmt1->execute();
if ($stmt1->affected_rows > 0){
echo 'password has been updated successfully.';
} else {
echo 'password update failed.';
}
看起来查询正在执行,但记录没有更新。这是SQLYog中的报告:
1 queries executed, 1 success, 0 errors, 0 warnings
Query: UPDATE users SET u_lpwd = 'nAJR9d4iVeOTS6D3JiPRVSMXgBRGqTKNo' WHERE u_id= 15 LIMIT 1
0 row(s) affected
Execution Time : 0.153 sec
Transfer Time : 0 sec
Total Time : 0.153 sec
答案 0 :(得分:0)
可能是白色空间问题
u_id= 15
似乎数据库中没有Entiry