tp3.2

浏览:339 发布日期:2020/03/16 分类:求助交流
$paper = D('paper');
$paperid=I('id');
$papers=$paper->find($paperid);

//实例化选择题数据库对象
$singlechoice = D('singlechoice');
$singles = $singlechoice -> where("sin_course = '化学类'") -> limit($papers['pa_sin_num']) -> order('rand()')-> select();
$this->assign('singles',$singles);

//实例化判断题数据库对象
$judge = D('judge');
$judges = $judge -> limit($papers['pa_jud_num']) -> order('rand()')-> select();
$this->assign('judges',$judges);
$this->display();

怎么在where中使用变量来比较科目,
最佳答案
评论( 相关
后面还有条评论,点击查看>>