我可以在参数 示例中使用几行吗
SELECT id, city_id FROM an_objects WHERE city_id IN (:arrCity)
(:arrCity)(1,2,3,4,5,6)
但是现在我已经完成了
SELECT id, city_id FROM an_objects WHERE city_id IN (:1p, :2p, :3p, ...... :100p)
而且非常糟糕
<?php private function PDOBindArray(&$poStatement, &$paArray){ foreach ($paArray as $k=>$v) { @$poStatement->bindValue($k, $v[0], $v[1]); } } // the array structure should now look something like this $inputArray = array( ':arrcity' => array($email, PDO::PARAM_STR), ':another_variable' => array($pass, PDO::PARAM_INT) ); ?>