自发布原则以来,DBAL2.13中已经添加了如下声明
here
旧的获取结果的方法是这样的:
$statement->execute();
while (($row = $statement->fetch()) !== false) {
}
新方法是这样的:
$result = $statement->execute();
while (($row = $result->fetchAssociative()) !== false) {
}
$statement->execute()
不返回结果集,只返回一个布尔值,因此没有要迭代的内容,即使发行说明声明:
DBAL3.0从语句API中提取所有fetch方法并移动
将它们转换为从语句::execute返回的新结果API。我们
已将此API向后移植到2.13