eruby dbi select problem

P

Peter Woodsky

Hi
I'm using eruby/mod_ruby on Apache 2.2 and I'm having a problem doing a
select against a table (mysql 5)

sth = dbh.execute("select type,site,amount from logger order by id
desc")

The select returns the results from type,site but not amount. Amount is
a decimal field. Ruby just throws the following internal server error.
If I remove amount it works fine. Any idea what I'm doing wrong?

[Mon Jan 21 12:19:14 2008] [error] mod_ruby:
/usr/lib/ruby/1.8/DBD/Mysql/Mysql.rb:649:in `column_info': undefined
method `[]' for nil:NilClass (NoMethodError)

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top