03-11-2008, 08:01 AM
[eluser]codelearn[/eluser]
Hey guys,
I'm having some trouble retrieving random entries from a table. I have a certain amount of multiple choice questions in a table and I need to retrieve a random amount of questions from a random set of questions.
The structure looks like this:
What would be the active record code to pull lets say 3 random questions from a particular set?
Thanks so much for the help!
Hey guys,
I'm having some trouble retrieving random entries from a table. I have a certain amount of multiple choice questions in a table and I need to retrieve a random amount of questions from a random set of questions.
The structure looks like this:
Code:
id (int)
question (text)
varchar (int)
set (int)
What would be the active record code to pull lets say 3 random questions from a particular set?
Thanks so much for the help!