vendredi 27 février 2015

How to shuffle a table of records in Delphi?

I have a table of questions each with a category and I want to query the database to first find questions of a specific category, and then retrieve a random question from that category. I was planning on doing this by shuffling all the records so they are in no particular order in the table, and then finding the first question that has the category I'm looking for. I know this will work, I just have no idea how to shuffle all the records in the table to get them in a random order. Anybody got any ideas on how to do this? Or an alternate method I could use? Thanks in advance. - George





Aucun commentaire:

Enregistrer un commentaire