search for: fetch_hash

Displaying 2 results from an estimated 2 matches for "fetch_hash".

Did you mean: each_hash
2012 Feb 02
3
problem in mysql and ruby data fetching
...ire ''mysql'' mysql = Mysql.init() mysql.connect(''localhost'',''root'','''',''ruby'') selection = mysql.prepare("select * from test where id=?") result = selection.execute(2) while row = result.fetch_hash do puts "The name is: #{row[''name'']}" end mysql.close(); So when I run this small part of the application I am getting the following error: in `<top (required)>'': undefined method `fetch_hash'' for #<Mysql::Stmt:0xf9d128> (...
2011 Aug 24
3
How to connect Ruby with MySQL (XAMPP)?
*Dear All:* I need your help on following points. 1. Can I connect Ruby with MySQL in XAMPP server? 2. Could someone tell me that how to connect MySQL with Ruby? I have XAMPP server 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