0
我有三个条件,但结果即将到来,虽然当我在简单的SQL上运行本地服务器上的查询它工作正常,但在Yii SQL查询它不给我正确的结果,我擦'andwhere
'的条件,它工作正常,但我想用两个'andwhere
'条件运行它。三和条件在Yii的sql语句
我用简单的SQL本地服务器上运行的查询是
SELECT business_id,isdeleted,user_id FROM `review_business` where user_id=13 and isdeleted is NULL and business_id=91
和我试图在警予运行查询
$results = Yii::app()->db->createCommand()
->select('r.user_id,r.business_id,r.isdeleted')
->from('review_business r')
->where('r.user_id=' . $u_id)
->andWhere('r.isdeleted=Null')
->andWhere('r.business_id=' . $bid)
->queryALL();
就像测试一样,如果硬编码值,它是否工作?像' - > where('r.user_id = 13')'和' - >和Where('r.business_id = 91')' – Ash
如何区分大小写queryAll()? –