Hello,
The code below returns the top 25 most recently-created tables in a MySQL database.
$index = mysql_query("select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='bookfeather' order by CREATE_TIME desc limit 25");
Each table has the following format:
id INT(11) NOT NULL auto_increment, site VARCHAR(350) NOT NULL, votes_up BIGINT(9) NOT NULL, votes_down BIGINT(9) NOT NULL, PRIMARY KEY(id), UNIQUE (site)
I would like to change the code to show:
Top 25 tables based on number of different entries for "site"
Top 25 tables based on sum of "votes_up"
How can I do this?
Thanks in advance,
John