如何在 prestashop 1.6 中更新 table
How to update table in prestashop1.6
我正在尝试更新 prestashop 1.6 中的 table。我尝试更新的 table 是 ps_employee
,但是当我尝试执行以下操作时出现错误。
$where='email='.$this->email_customer;
$pwd=******;
$updateEmployee= Db::getInstance()->update(
'employee',
array('passwd' => $pwd),
$where
);
很遗憾,我此时无法访问该错误。但是,此代码在尝试更新 id_employee=6
位置时有效,但当我尝试将其与电子邮件地址一起使用时,它失败了。
enter image description here
将这一行写成如下以避免语法错误:-
$where="email='$this->email_customer'";
注意:- 在将密码保存到数据库之前,请始终加密您的密码。最简单的技术之一是 MD5。例如。 $password = md5($_POST['password']);
我正在尝试更新 prestashop 1.6 中的 table。我尝试更新的 table 是 ps_employee
,但是当我尝试执行以下操作时出现错误。
$where='email='.$this->email_customer;
$pwd=******;
$updateEmployee= Db::getInstance()->update(
'employee',
array('passwd' => $pwd),
$where
);
很遗憾,我此时无法访问该错误。但是,此代码在尝试更新 id_employee=6
位置时有效,但当我尝试将其与电子邮件地址一起使用时,它失败了。
enter image description here
将这一行写成如下以避免语法错误:-
$where="email='$this->email_customer'";
注意:- 在将密码保存到数据库之前,请始终加密您的密码。最简单的技术之一是 MD5。例如。 $password = md5($_POST['password']);