我試圖更新我的帳戶信息,但得到了同樣的錯誤,所有的時間PHP更新查詢錯誤
public function update_user() {
$obj_db = $this->obj_db();
$query_update = "update `users` set "
. "first_name='$_POST[first_name]',"
. "middle_name='$_POST[middle_name]',"
. "last_name='$_POST[last_name]',"
. "email='$_POST[email]',"
. "gender='$_POST[gender]',"
. "contact_number='$_POST[contact_number]'"
. "where `userID` = '$this->userID'";
$r4 = $obj_db->query($query_update);
if ($obj_db->affected_rows == 0) {
throw new Exception(" * Update user information error <br> Nothing Update");
}
}
向我們展示了'
'代碼。 – Webeng先生,我編輯了帖子 –
請檢查一下 –