1 Replies - 488 Views - Last Post: 09 May 2010 - 03:20 AM Rate Topic: -----

#1 Kim333  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-May 10

Generating

Posted 08 May 2010 - 11:47 PM

How do you generate random questions from a database and display it on a GUI component
Is This A Good Question/Topic? 0
  • +

Replies To: Generating

#2 keakTheGEEK  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 108
  • View blog
  • Posts: 344
  • Joined: 23-February 10

Re: Generating

Posted 09 May 2010 - 03:20 AM

This link has SQL statements to Select a random row from a database table.

Another approach would be to include logic in your application code that generates a random value which is a key to a record in your database table. Then use that value in your select statement to retrieve the record.



EDIT: This is of course, assuming that your questions are already stored in your database and you are asking how to retrieve a random question.

This post has been edited by keakTheGEEK: 09 May 2010 - 03:22 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1