@loo = @loo.first.to_i

On Wed, Nov 18, 2009 at 6:26 PM, INDRANIL MUKHERJEE <
[email protected]> wrote:

> **this is the error:
>
> undefined method `to_i' for ["5"]:Array
>
>
> **this is the code:
>
> sql = ActiveRecord::Base.connection();
> @loo = sql.execute("select count(name) from data1.items").fetch_row;
>
> @loo = @loo.to_i
>
>
> Plz help; it is urgent.
>
> regards,
>
> INDRANIL MUKHERJEE
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=.
>
>
>


-- 
Adam Jones
Digirati Limited NZ
[email protected]
P 027 233 6933

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=.


Reply via email to