I have problems in joining several queries with different data limits depending on the subject, having the query raised as follows:
$sql = "SELECT * FROM quiz WHERE materia = 'matematico' LIMIT 40
UNION
SELECT * FROM quiz WHERE materia = 'Lenguaje' LIMIT 30
UNION
SELECT * FROM quiz WHERE materia = 'Ciencias' LIMIT 30
UNION
SELECT * FROM quiz WHERE materia = 'Historia' LIMIT 30
UNION
SELECT * FROM quiz WHERE materia = 'Quimica' LIMIT 30";
The problem is that it only shows me a single result, when in each subject there are 500 questions.