Visit the ColdFusionProNews Directory
Beginners
Installation, Coding Techniques, Data Structures...
CF Powered Sites
Stores, Directories, Universities...
Developers
Developers, Designers, Experts...
E-commerce
Shoes, Food, Music...
Education
Books, Online Resource, Languages...
Expert
LiveChat , CFX XMLParser , User Defined Function Library...
Hosting
Dedicated Servers, Virtual Server, Multi-user...
Intermediate
AutoResize , DataSource Encryption, Guestbook...

Submit your site for FREE

Archive for December, 2007

Randomizing the Display of a Query

Tuesday, December 4th, 2007

Charles asks a pretty common question about randomizing the result of a query:

I have a simple page that loops a couple queries and randomly issues the question and choices. I have the loop go from 1 to 10; however sense I do not want to have duplicate questions, I did a conditional that does not allow dups to be shown. In turn, instead of giving me my nice 1-10 quiz, I get random amount of questions. I completely understand why this is happening, but have trouble coming up with a solution.

(more…)