search for: status_publish

Displaying 1 result from an estimated 1 matches for "status_publish".

2011 Aug 24
3
How to connect Ruby with MySQL (XAMPP)?
...er installed and want to connect with ruby. I am using Ruby1.8.7. I tried following code: require ''rubygems'' require ''mysql'' begin # connect to the MySQL server dbh = Mysql.connect("localhost", "root", "root", "status_publish") puts dbh # get server version string and display it puts "Server version: " + dbh.get_server_info rescue Mysql::Error => e puts "Error code: #{e.errno}" puts "Error message: #{e.error}" puts "Error SQLSTATE: #{e.sqlstate}...