Example #1
0
 public function actionNoticeCount()
 {
     echo new ReturnInfo(RET_SUC, array('data' => Notice::Model()->count("targetUserid=:targetUserId AND readFlag = 1", array("targetUserId" => $this->apiUser->ID))));
 }
Example #2
0
 public function actionNoticeCount()
 {
     if (Yii::app()->request->isAjaxRequest) {
         echo Notice::Model()->count("targetUserid=:targetUserId AND readFlag = 1", array(":targetUserId" => Yii::app()->user->id));
     }
 }