I have a table with questions from three categories.
I get one random question by using the following:
SELECT * FROM tblQuestions ORDER BY RAND() LIMIT 1
But the table also have a field called qCategory where there are 3 categories in total. What I want is the SQL query to get one question from each of the 3 categories (so 3 random questions in total).
You can combine the results of three queries by using
UNION ALL: