# Eruby dbi select problem

**URL:** <https://rubytalk.org/t/eruby-dbi-select-problem/43937>\
**Category:** ruby-talk\
**Created:** [21 January 2008 17:28 UTC](https://rubytalk.org/t/eruby-dbi-select-problem/43937 "2008-01-21T17:28:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Heywood](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@Peter\_Heywood](https://rubytalk.org/u/Peter_Heywood)\
**Post date:** [21 January 2008 17:28 UTC](https://rubytalk.org/t/eruby-dbi-select-problem/43937/1 "2008-01-21T17:28:29Z")

</div>

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

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
