Let the storm money come!

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

posted @ 2016-06-12 16:44  精密~顽石  阅读(498)  评论(0编辑  收藏  举报
在通往地狱的路上,加班能使你更快到达。