1234567891011121314151617181920212223242526272829303132 |
- <?php
- class SJuniorMathCommonTopic extends MyActiveRecord {
- public static function model($className = __CLASS__)
- {
- return parent::model($className);
- }
- public function tableName()
- {
- return 'junior_math_common_topic';
- }
- /**
- * 共性题数据
- * @param $examId
- * @param $classId
- * @return array|null
- */
- public function getCommonTopic($examId, $classId){
- $criteria = new CDbCriteria();
- $criteria->select = 'topic_id,tymhd_id';
- $criteria->addCondition('exam_id='.$examId);
- $criteria->addCondition('class_id='.$classId);
- $criteria->order = 'topic_order ASC';
- $result = getAttributes($this->findAll($criteria));
- return $result;
- }
- }
|