db251; } public static function model($className = __CLASS__){ return parent::model($className); } public function tableName(){ return "order_clazz"; } public function primaryKey(){ return array('id'); } public function getOrderIDByClassId($class_id='') { $criteria = new CDbCriteria(); if($class_id) { $criteria->addCondition('clazz_id=:clazz_id'); $criteria->params[':clazz_id'] = $class_id; } $data = $this->findAll($criteria); if($data) { return $data; } return false; } public function getOrderIDInClassId($class_ids=array()) { $criteria = new CDbCriteria(); if($class_ids) { $criteria->addInCondition('clazz_id ',$class_ids); // $criteria->params[':clazz_id'] = implode(",", $class_ids); } $data = $this->findAll($criteria); if($data) { return $data; } return false; } }