12345678910111213141516171819202122232425262728293031 |
- <?php
- class SProductCommonTopic extends MyActiveRecord {
- public static function model($className = __CLASS__)
- {
- return parent::model($className);
- }
- public function tableName()
- {
- return 'product_common_topic';
- }
- /**
- * 共性题数据
- * @param $examId
- * @param $isMethod //是否方法共性
- * @return array|null
- */
- public function getCommonTopic($examId, $isMethod=1){
- $criteria = new CDbCriteria();
- $criteria->select = 'template_id,template_no,topic_id';
- $criteria->addCondition('exam_id='.$examId);
- $criteria->addCondition('is_action='.$isMethod);
- $criteria->order = 'template_no ASC';
- return $this->findAll($criteria);
- }
- }
|