我在我的Yii Web App中传递findAllByAttributes()方法中的下列数组。findAllByAttributes在Yii框架中不返回任何值
$fileArr= Array
(
[0] => 790c83
[1] => 402faf
[2] => 646209
[3] => 9332c5
)
$files = File::model()->findAllByAttributes(array('code' => $fileArr));
print_r($fileArr);
exit;
当我试图打印这个返回空白。我也尝试通过使用implode函数将数组转换为字符串,并将其传入findAllByAttributes()
方法,但仍然无效。我如何在yii中实现这一点?
使用addInCondition和检查 – Ninad
什么的'的findAll()',而不是结果呢? – topher