Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004

    Unanswered: query to return random rows

    I have a table with (questions and question ID's).. i want to write a query that will return a random set of questions from the database.
    How can i do this..

    thanks for your help...

  2. #2
    Join Date
    Jul 2004
    Dundee, Scotland
    the following mysql query would return 10 random questions form your database:

    SELECT question_id, question_text FROM table_name ORDER BY rand() limit 0,10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts