Its all about Ruby On Rails
Rails: Issuing direct query to database
You can issue direct query to database by:
result = ActiveRecord::Base.connection.execute("SELECT * from tablename")
and fetch hash:
a=result.fetch_hash
| Print article | This entry was posted by Akhil Bansal on June 19, 2006 at 2:25 am, and is filed under ROR, Rails, Rubyonrails. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |