mysql
2017-10-27 1 views -2 likes 
-2

다른 학위를, 테이블 question_bank 질문을 인출 할이 내 코드는 그래서 누군가가 나에게 도와주세요 내가 작성하는 방법을 모르는 내가 PHP의 새로운 오전

$query = ("('select * from question_bank where test_id = '$id' and question_degree ='$simple' limit $s') union ('select * from question_bank where test_id = '$id' and question_degree ='$medium' limit $m') union ('select * from question_bank where test_id = '$id' and question_degree ='$hard limit $h')"); 
+0

무엇을 시도했는지, 잘못된 점은 무엇인지 알려주세요. 질문은 SO 표준에 위배되지 않습니다. 이 게시물을 살펴보십시오. https://stackoverflow.com/help/how-to-ask –

+0

https://meta.stackoverflow.com/questions/333952/why-should-i-provide-an-mcve-for를 참조하십시오. -white-to-me-to-be-a-very-simple-sql-query – Strawberry

답변

-1

을 시도하다
select * from question_bank where test_id='$id' and question_degree in ('$simple', '$medium', '$hard') 
+0

귀하의 즉각적인 응답을 보내 주셔서 감사합니다.이 쿼리는 괜찮지 만 단순한 10 및 중간 5의 다른 제한 예제로 가져 오려고합니다. 2 –

관련 문제