If you want each record to be shown an equal amount of time: Store the latest record ID shown (e.g., in a temp file) and select the next ID from the database (select .. from TABLE where ID > LAST_ID limit 1.
This will not retrieve a random record from the database, but will for the user create a random records shown, especially if the website gets some visitors simultaniously.