suchen

Heim  >  Fragen und Antworten  >  Hauptteil

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

烟雨江南烟雨江南2910 Tage vor1113

Antworte allen(1)Ich werde antworten

  • 迷茫

    迷茫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');

    Antwort
    0
  • StornierenAntwort