Cannot use object of type yii\db\Connection as array

$pointLog = $conn->createCommand('select * from table1 where is_deleted = 0 AND id1 = :id1 AND id2 = :Id2',
[":id1" => $Id1, ":id2" => $Id2])->queryAll();

  如果少了这个 queryAll 就会报这种错误。因为不是一个结果集,后面的代码又会引用当做行来用,php 报错很奇葩。

上一篇:c++ 11 key note


下一篇:第二百三十六天 how can I 坚持