简体   繁体   English

1054 where子句中的未知列?

[英]1054 Unknown column in where clause?

i am updating my table employer with the following details but it is showing above error while updating 我正在使用以下详细信息更新我的表雇主,但在更新时显示上述错误

  <?php  

      $name=$_POST['name'];
      $phone=$_POST['phone'];
      $lname=$_POST['lname'];
      $stmt = $db->prepare("UPDATE employer 
     SET name='.$name.', phone='.$phone.',lname='.$lanme.' 
      WHERE username=".$_SESSION['username']." ");
      ?>

Query Statement is not properly concatenated. 查询语句未正确连接。 This is the issue: 这是问题:

 $stmt = $db->prepare("UPDATE employer 
     SET name='".$name."', phone='".$phone."',lname='".$lanme."' 
      WHERE username='".$_SESSION['username']."' ");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “ where子句”中的未知列“ x” [1054] - Unknown column 'x' in 'where clause' [1054] PDO#1054“ where”子句中的未知列“ n” - PDO #1054 Unknown column 'n' in 'where clause 找不到列:1054“ where子句”中的未知列“ id”-Laravel - Column not found: 1054 Unknown column 'id' in 'where clause' - Laravel 未找到列:1054“ where子句”中的未知列“ id” - Column not found: 1054 Unknown column 'id' in 'where clause' updateOrCreate()给出未找到的列:1054“ where子句”中的未知列“ 0” - updateOrCreate() gives Column not found: 1054 Unknown column '0' in 'where clause' 未找到列:1054 'where 子句'中的未知列'id' Laravel 5.6 - Column not found: 1054 Unknown column 'id' in 'where clause' Laravel 5.6 1054-“ where子句”中的未知列“ apa_calda” - 1054 - Unknown column 'apa_calda' in 'where clause' 如何修复错误号:1054“ where子句”中的未知列“ Array” - How to fix Error Number: 1054 Unknown column 'Array' in 'where clause' 错误:SQLSTATE[42S22]:未找到列:1054 &#39;where 子句&#39;中的未知列 &#39;0&#39; - ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column '0' in 'where clause' SQLSTATE [42S22]:找不到列:1054 'where 子句'中的未知列'Users.email' - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Users.email' in 'where clause'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM