搜索

首页  >  问答  >  正文

php如何批量修改某一字段的值?

烟雨江南烟雨江南2910 天前1109

全部回复(1)我来回复

  • 迷茫

    迷茫2017-03-13 09:32:28

    where in 不能直接传数组的

    $arr=[33, 64, 89, 128];
    
    echo $sql="update table set `column`='value' where id in ('".implode("','",$arr)."');";
    // update table set `column`='value' where id in ('33','64','89','128');

    回复
    0
  • 取消回复