If you want to select a random record from a database;

  • an easy way is to find the total number of fields inside the table — select a random number in that range, and then request that row from the database.
  • 117 more words