What is the problem? How to choose a random record?
The problem is choosing a random record from a table but not showing a record that has already been shown once.
E.G.
I have these record: 1,2,3,4,5,6,7,8,9,10
One record is chosen randomly, 7.
7 is shown to the user, user then clicks the button to show another random record.
The app could then show record 7 again as it is chosen randomly, but we don't want that, it needs to be a record that the user hasn't seen yet.
So then we show 2,3,5,6,7,9,10 and don't show them again until 1, 4 and 8 have been seen at which point it repeats the process.