db251; } public static function model($className = __CLASS__){ return parent::model($className); } public function tableName(){ return "payment"; } public function primaryKey(){ return array('id'); } public function getOrderPay($order_ids=array(),$status=1){ $criteria = new CDbCriteria(); if($status>=0){ $criteria->addCondition('status='.$status); } if($order_ids) { $criteria->addInCondition('order_id',$order_ids); } return $this->findAll($criteria); } }