码上敲享录 > PHP开发经验分享 > 解决reset() expects parameter 1 to be array, string given

解决reset() expects parameter 1 to be array, string given

上一章章节目录下一章 2018-07-22已有12097人阅读 评论(0)

报错信息:

reset() expects parameter 1 to be array, string given


解决方法:

$criteria = new CDbCriteria();

$criteria->addInCondition("recommendlevel", '1');

上面语句就会报上面的错误,因为addInCondition要求传入数组类型,而你却传入了字符类型,修改如下即可

$criteria->compare("recommendlevel",'1');


本文地址:http://www.yayihouse.com/yayishuwu/chapter/1336


向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti
0

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交