Created
November 9, 2011 11:48
-
-
Save xianhuazhou/1351213 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'mysql' | |
| db = Mysql.new('webdb', 'root', 'pa$$', 'home') | |
| db.query("SHOW TABLES LIKE '%home%'").each do |row| | |
| tb_status = db.query("CHECK TABLE #{row[0]}").fetch_row | |
| puts tb_status.join("\t") | |
| end | |
| db.close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment