That suggests a sql select with the LIMIT random,1 suffix for each random record you want to retrieve.
Depending on the size of the total table and the number of records you want to retrieve consider fetching the data into a PhP array and randomly accessing this.