Randomly selecting from a table and making sure it's not already chosen

I'm fairly new to tables, but I'm going to use it for my new project and I'm wondering how this could be done:
I have a series of questions in a table and want to select 5 for example, how can I choose 5 of those, store it in
another table and make sure none of the questions have already been drawn from the table ?

Best Answer

  • gyroscopegyroscope I am here.Posts: 6,598
    edited September 2014 Accepted Answer

    Hi @LyboTech the principal is to use your random from 1 to the max. amount of rows in your (copied) table, then each time that particular row is chosen, its deleted, so it can't be picked again.

    Here's a little test for you to see what I mean:

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Answers

Sign In or Register to comment.