questionbankoptionsmodel.php 709 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace app\index\model;
  3. use think\Model;
  4. /**
  5. * 题库选项
  6. *
  7. * @author wj
  8. * @date 2025-07-24
  9. */
  10. class questionbankoptionsmodel extends Model {
  11. protected $table = 't_question_bank_options';
  12. public function getoptionsbyseqbid($qbid) {
  13. $list = $this->where(['seqb_id' => $qbid])->order("id asc")->select();
  14. return $list;
  15. }
  16. public function getinfobyid($id) {
  17. $where_arr['id'] = $id;
  18. $rec = $this->where($where_arr)->find();
  19. return $rec;
  20. }
  21. public function getinfobywhere($qbid, $id) {
  22. $where_arr['id'] = $id;
  23. $where_arr['seqb_id'] = $qbid;
  24. $rec = $this->where($where_arr)->find();
  25. return $rec;
  26. }
  27. }