SJuniorMathCommonTopic.php 762 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. class SJuniorMathCommonTopic extends MyActiveRecord {
  3. public static function model($className = __CLASS__)
  4. {
  5. return parent::model($className);
  6. }
  7. public function tableName()
  8. {
  9. return 'junior_math_common_topic';
  10. }
  11. /**
  12. * 共性题数据
  13. * @param $examId
  14. * @param $classId
  15. * @return array|null
  16. */
  17. public function getCommonTopic($examId, $classId){
  18. $criteria = new CDbCriteria();
  19. $criteria->select = 'topic_id,tymhd_id';
  20. $criteria->addCondition('exam_id='.$examId);
  21. $criteria->addCondition('class_id='.$classId);
  22. $criteria->order = 'topic_order ASC';
  23. $result = getAttributes($this->findAll($criteria));
  24. return $result;
  25. }
  26. }