ZlStudentExamRs.php 620 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * @author: CeeFee
  4. * @description: 考试
  5. */
  6. class ZlStudentExamRs extends Model
  7. {
  8. function __construct(){
  9. parent::__construct();
  10. }
  11. public function getCountStudentRsByExamGroupId($exmGroupId,$examId=0){
  12. if(!$exmGroupId) return 0;
  13. $sql="select DISTINCT zl_student_id from `zl_student_exam_rs` where zl_exam_group_id = '".$exmGroupId."'";
  14. if($examId){
  15. $sql.=" and zl_exam_id='".$examId."'";
  16. }
  17. $data=$this->sConn->createCommand($sql)->queryAll();
  18. if($data){
  19. return count($data);
  20. }
  21. return 0;
  22. }
  23. }