edit_id order by num asc ]]> edit_id and type_num=1) q_count1, (select count(type_num) q_count from et_exam_exampaper_and_editexampaper inner join et_exam_editexampaper on et_exam_exampaper_and_editexampaper.id = et_exam_editexampaper.edit_id where <@p>edit_id and type_num=2) q_count2, (select count(type_num) q_count from et_exam_exampaper_and_editexampaper inner join et_exam_editexampaper on et_exam_exampaper_and_editexampaper.id = et_exam_editexampaper.edit_id where <@p>edit_id and type_num=3) q_count3, (select count(type_num) q_count from et_exam_exampaper_and_editexampaper inner join et_exam_editexampaper on et_exam_exampaper_and_editexampaper.id = et_exam_editexampaper.edit_id where <@p>edit_id and type_num=4) q_count4, (select count(type_num) q_count from et_exam_exampaper_and_editexampaper inner join et_exam_editexampaper on et_exam_exampaper_and_editexampaper.id = et_exam_editexampaper.edit_id where <@p>edit_id and type_num=5) q_count5 ]]> id) as edit_id,num,subject,type,type_num,ismust,score,optionA,optionB,optionC,optionD,optionE,optionF,isParagraph,answer from et_exam_editexampaper where <@p>edit_id ]]> categoryid and type = '1') singlenumcheck, (select count(*) from et_exam_question where <@p>categoryid and type = '2') multiplenumcheck, (select count(*) from et_exam_question where <@p>categoryid and type = '3') judgementnumcheck, (select count(*) from et_exam_question where <@p>categoryid and type = '4') blanknumcheck, (select count(*) from et_exam_question where <@p>categoryid and type = '5') essaynumcheck ]]> edit_id ]]> id) as edit_id,subject,question_type,type,1 as ismust,optionA,optionB,optionC,optionD,optionE,optionF,0 as isParagraph,answer from et_exam_question where <@p>categoryid and type = 1 <@p p=" and %s">card order by rand() limit <@p p=" ? ">singleNum) union (select md5(uuid()) as id,(select id from et_exam_exampaper_and_editexampaper where <@p>id) as edit_id,subject,question_type,type,1 as ismust,optionA,optionB,optionC,optionD,optionE,optionF,0 as isParagraph,answer from et_exam_question where <@p>categoryid and type = 2 <@p p=" and %s">card order by rand() limit <@p p=" ? ">multipleNum) union (select md5(uuid()) as id,(select id from et_exam_exampaper_and_editexampaper where <@p>id) as edit_id,subject,question_type,type,1 as ismust,optionA,optionB,optionC,optionD,optionE,optionF,0 as isParagraph,answer from et_exam_question where <@p>categoryid and type = 3 <@p p=" and %s">card order by rand() limit <@p p=" ? ">judgementNum) union (select md5(uuid()) as id,(select id from et_exam_exampaper_and_editexampaper where <@p>id) as edit_id,subject,question_type,type,1 as ismust,optionA,optionB,optionC,optionD,optionE,optionF,0 as isParagraph,answer from et_exam_question where <@p>categoryid and type = 4 <@p p=" and %s">card order by rand() limit <@p p=" ? ">blankNum) union (select md5(uuid()) as id,(select id from et_exam_exampaper_and_editexampaper where <@p>id) as edit_id,subject,question_type,type,1 as ismust,optionA,optionB,optionC,optionD,optionE,optionF,0 as isParagraph,answer from et_exam_question where <@p>categoryid and type = 5 <@p p=" and %s">card order by rand() limit <@p p=" ? ">essayNum) ) a,(select @i:=0) z ]]> id order by type_num) j, (select @i:=0) z set a.num = j.i where a.id=j.id and <@p p =" edit_id = ? ">id ]]> id ]]> edit_id ]]> edit_id) as sum from et_exam_editexampaper where <@p>edit_id <@p p="and type_num in(%s)" f="?">type_num ]]> newnum where <@p>edit_id <@p p=" and %s">num ]]> num where <@p>id ]]> newnum where <@p>edit_id <@p p=" and num = ?">oldnum ]]> num where <@p>id ]]> edit_id ]]>