Rails: Issuing direct query to database
June 19, 2006
You can issue direct query to database by:
result = ActiveRecord::Base.connection.execute("SELECT * from tablename")
and fetch hash:
a=result.fetch_hash
Entry Filed under: RubyonRails, rails. .







Trackback this post | Subscribe to the comments via RSS Feed