输入banner图图片脚本导航/分类

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 报错很奇葩。

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

标签: