I need a fast, efficient way to randomly return to me the names of 4 tables in a single mysql database. The tables DO NOT have a structured naming pattern, except that they are all lowercase letters and numbers.
example:
my_database contains the following tables:
(cat, dog, boat, car, cars, cars35, accorns, accerns, speaker, shell, olympics, politics, fray, ttypo, ... (thousands of tables like this) ... , road)
I need an efficient way to return the names of a set number of random tables without overlap.
example:
function_random_table(4) would return 4 table names stored to the following variables:
$random_1 = cars
$random_2 = cars35
$random_3 = shell
$random_4 = cat
Just use INFORMATION_SCHEMA.TABLES: