Yii查询count()

BsCapters::model()->findAllBySql("select count(*) as bookids from bs_capters where bookid = ".$bookid." and urlid = ".$urlid)

count(*) as xxx

这个xxx必须是表里面存在的字段否则无法取到值

posted @ 2014-05-27 14:46  -j神-----  阅读(5901)  评论(0编辑  收藏  举报