Hi I am doing a program for give question, but this questions need be differents for differents user now I need generate questions random in mysql try to use RAND() but i can't make that this work fine for my requirement, this don't work:
SELECT * FROM oscuro.answers
INNER JOIN questions ON answers.question_id = questions.id
INNER JOIN sub_categories ON questions.sub_category_id = sub_categories.id
WHERE sub_categories.category_id = 1 AND questions.id > RAND();
I need questions.id
a number random of all records on the table questions, this should give a random question with all answers of this question. how I generate random number only for that field?