From: Jens Rohde Date: 2001-09-26T05:55:55+09:00 Subject: [ruby-talk:21682] Re: Problems with the mysql-module On Wed, 26 Sep 2001, Dave Thomas wrote: > Jens Rohde writes: > > > @dbHandle.do = (sql,theData[2].to_i,theData[4]) > ^^ > > is this right? I used this example from Michael Neumanns DBI-homepage as inspiration: require 'dbi' # connect to a datbase dbh = DBI.connect('DBI:Mysql:pixlog', 'dbuser', 'secret') puts "inserting..." 1.upto(13) do |i| sql = "insert into simple01 (SongName, SongLength_s) VALUES (?, ?)" dbh.do(sql, "Song #{i}", "#{i*10}") end [..] Have I misunderstood something? -- Jens Rohde, System Administrator ----------------------------------------------------------------------- Eastfork Object Space (EOS), Margrethepladsen 3, 8000 Aarhus C, Denmark Tel: +45 8732 8787 / Fax: +45 8732 8788