dongmen1925 2017-07-14 09:48
浏览 128
已采纳

在codeigniter中使用多个where条件更新表

I have to update the table if only the three values gets matched. I get a syntax error on trying this. What could be the reason?

 $sql1="update target set updvalue='".$val3."'  where Id ='".$b."'" AND MId ='".$c."'" AND DID ='".$f."'";
 $res1=$this->db->query($sql1);
  • 写回答

3条回答 默认 最新

  • doulian1852 2017-07-14 09:53
    关注
    $sql1="update target set updvalue='".$val3."'  where Id ='".$b."' AND MId ='".$c."' AND DID ='".$f."'";
    $res1=$this->db->query($sql1);
    

    use this

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题