From: Idealone Ideally Date: 2010-01-28T21:05:41+09:00 Subject: Re: How to connect to Mysql & Query for Database Tables Albert Schlef wrote: > Idealone Ideally wrote: >> Hi Guys, >> Ruby imposes several way[s] of [...] using ruby code. > > That's certainly an interesting observation. Guys, I eventually got it working, just adding gem 'dbi'.. require "rubygems" gem "dbi" require "dbi" def connect_to_mysql() puts "\nConnecting to MySQL..." me = DBI.connect("dbi:Mysql:DBname:localhost", "root", "") query = me.prepare("SELECT * FROM browsers where id > ?") query.execute(0) while row = query.fetch() do puts row end Thanks -- Posted via http://www.ruby-forum.com/.