title: ActiveRecord::Base.connection.execute duplicates sql output
body: <p>I am a newbie to rails and i needed to execute some sql query and output it to the view. In my controller i used something like "<code>@prob = ActiveRecord::Base.connection.execute("...")</code> and then simply displayed the @prob in the view. However the output in the view keeps coming twice as 0 result column name result . </p>
  
  <p>The sql query was</p>
  
  <pre><code> @cprob = ActiveRecord::Base.connection.execute("SELECT DISTINCT cause FROM pages LIMIT 2")
  </code></pre>
  
  <p>and my application environment is </p>
  
  <pre><code>Ruby version    1.8.7 (i386-mingw32)
  RubyGems version    1.3.6
  Rack version    1.0
  Rails version   2.3.5
  Active Record version   2.3.5
  Active Resource version 2.3.5
  Action Mailer version   2.3.5
  Active Support version  2.3.5
  Application root    C:/Users/Prateek/BitNami RubyStack projects/noc
  Environment development
  Database adapter    sqlite3
  Database schema version 20100616055513
  </code></pre>
  
  <p>Update : - I found out that the oputput for ActiveRecord::Base.connection.execute is actually an array containing hashes like {:0 => queryresult  :columnname => queryresult}</p>
  
  <p>so how do i get just the queryresult from this </p>