我想更新表用户的某些字段,但是我收到此错误:
致命错误:在第79行的C:\ Users \ fel \ VertrigoServ \ www \ login \ thumb.php中的非对象上调用成员函数bind_param()
代码中是否存在语法错误?
$user=2;
($sql = $db -> prepare('UPDATE users SET (profile_photo, update_photo) VALUES (?, ?) where id_user=?'));
$sql -> bind_param('ssi', $thumbnailPath, $thumbnailPathMin, $user); //line 79
$sql -> execute();
感谢
答案 0 :(得分:-1)
解决
($sql = $db -> prepare('UPDATE users SET profile_photo = ?, update_photo=? where id_user=?'));