我在这里发布我的代码,我在z-ray中调试并检查mysql-command中的rawSQL。如果我第二次运行rawSQL,我可以获得拖拽行(686和687)。但它在ZF2中并不起作用。
$sql = "select * from kd_oa_userinfo where user_id in (:user_id)";
$statement = $this->adapter->createStatement($sql);
//first time,i set the $sqlArg = array('user_id' => "686,687") ,and z-ray print "select * from kd_oa_userinfo where user_id in ('686,687')"
//second time,i set the $sqlArg = array('user_id' => "686','687") ,and z-ray print "select * from kd_oa_userinfo where user_id in ('686','687')"
$result = $statement->execute($sqlArg);
$resultSet = new ResultSet;
$resultSet->initialize($result);
$result = $resultSet->toArray();
var_dump($result);//but the $result always be 686
exit();