I am trying to select a random record from a database for display.
each entry has an id number, but they may not be consecuitve...IE - records get added and deleted from time to time...
how can I display one at random? The code I have come up wiwth relies on the entries always being consecutively numbered , which is not feasible.
baiscally it goes like this:
1 - get number of records
2 - randomize that number
3 - select * where QID = that randomized number.
but you see....as records get deleted, any give id number could be gone.
each entry has an id number, but they may not be consecuitve...IE - records get added and deleted from time to time...
how can I display one at random? The code I have come up wiwth relies on the entries always being consecutively numbered , which is not feasible.
baiscally it goes like this:
1 - get number of records
2 - randomize that number
3 - select * where QID = that randomized number.
but you see....as records get deleted, any give id number could be gone.