搜尋

首頁  >  問答  >  主體

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

烟雨江南烟雨江南2972 天前1138

全部回覆(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
  • 取消回覆