Php 如何在prestashop1.6中更新表

Php 如何在prestashop1.6中更新表,php,prestashop-1.6,Php,Prestashop 1.6,我正在尝试更新prestashop 1.6中的表。我试图更新的表是ps\u employee,但当我尝试执行以下操作时,我得到一个错误 $where='email='.$this->email_customer; $pwd=******; $updateEmployee= Db::getInstance()->update( 'employee', array('passwd' => $pwd), $where ); 不幸的是,我现在无法访问该错误。

我正在尝试更新prestashop 1.6中的表。我试图更新的表是
ps\u employee
,但当我尝试执行以下操作时,我得到一个错误

$where='email='.$this->email_customer;
$pwd=******;
$updateEmployee= Db::getInstance()->update(
    'employee', 
    array('passwd' => $pwd),
    $where
);
不幸的是,我现在无法访问该错误。但是,当尝试更新where
id\u employee=6
时,此代码起作用,但当我尝试将其与电子邮件地址一起使用时,它失败。

按如下方式写这一行以避免语法错误:-

    $where="email='$this->email_customer'";

注意:-在将密码保存到数据库之前,请始终加密密码。最简单的技术之一是MD5。例如,
$password=md5($_POST['password'])

抱歉,我无法打开错误代码,但我知道当我尝试使用where'id\u employee=6'进行更新时,它可以工作,但当我使用where'email=email'时,我无法更新它。您可能需要避开
$this->email\u客户
,否则,查询结果将类似于
WHERE email=foo@bar.com
这会导致语法错误。您好,您可以单击“在此处输入图像描述”屏幕截图的链接。密码可以,但我需要更新密码,其中email=email如果我使用where id\u employee=number进行更新,但当我使用email=email时,我不知道为什么。。!当我使用您的$where=“email=”$this->email\u customer';它更新了我所有的ps_员工行好的,谢谢大家!当我使用这个“$updateEmployee=Db::getInstance()->update('employee',$data,$email='$thisemail'”;”时,现在正在工作