English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2007-05-04 14:52:10 · 1 answers · asked by mcary999 1 in Computers & Internet Programming & Design

1 answers

require 'rubygems'
require_gem 'mysql'

my=Mysql::new("localhost","root","pass","mydb")

results=my.query("Select * from table")

row=results.fetch_row

(row will contain an array of the values in each column. You can repeat the fetch_row to get the rest of the rows and process each one.)

2007-05-04 15:23:54 · answer #1 · answered by Vegan 7 · 0 0

fedest.com, questions and answers