`
dowhathowtodo
  • 浏览: 780877 次
文章分类
社区版块
存档分类
最新评论

yii orm实现 sql的where id in

 
阅读更多
  	    	$ids = $_POST['hideId'];  	    	
  	    	$criteria = new CDbCriteria;
  	    	$criteria->addInCondition( "id" , $ids ); 	    	
  	    	Province::model()->updateAll(array('commend'=>0), $criteria);


以上实现的是where id in ($ids),然后updateAll

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics