P
Pen Ttt
require "mysql"
dbh = Mysql.real_connect("localhost", "root", "******", "valuation")
res = dbh.query("show tables")
puts res
res.free
the output is:
#<Mysql::Result:0x997c014>
in mysql console:
mysql> show tables;
+---------------------+
| Tables_in_valuation |
+---------------------+
| balance_sheet |
| test |
+---------------------+
2 rows in set (0.00 sec)
how can i get it with ruby?
dbh = Mysql.real_connect("localhost", "root", "******", "valuation")
res = dbh.query("show tables")
puts res
res.free
the output is:
#<Mysql::Result:0x997c014>
in mysql console:
mysql> show tables;
+---------------------+
| Tables_in_valuation |
+---------------------+
| balance_sheet |
| test |
+---------------------+
2 rows in set (0.00 sec)
how can i get it with ruby?