$pointLog = $conn->createCommand(‘select * from table1 where is_deleted = 0 AND id1 = :id1 AND id2 = :Id2‘, [":id1" => $Id1, ":id2" => $Id2])->queryAll();
如果少了这个 queryAll 就会报这种错误。因为不是一个结果集,后面的代码又会引用当做行来用,php 报错很奇葩。
时间: 2024-10-08 22:37:45
$pointLog = $conn->createCommand(‘select * from table1 where is_deleted = 0 AND id1 = :id1 AND id2 = :Id2‘, [":id1" => $Id1, ":id2" => $Id2])->queryAll();
如果少了这个 queryAll 就会报这种错误。因为不是一个结果集,后面的代码又会引用当做行来用,php 报错很奇葩。