search for: mrdaka

Displaying 1 result from an estimated 1 matches for "mrdaka".

2008 May 16
1
Sql queries in rails
I have an assignment and I need to be able to run a query inputted by the user (no matter what the query). Also I need to display the result cleanly with the field names if the query was a select query. So far I have @result = ActiveRecord::Base.connection.execute(params[:query]) and in my view I have <% for result in @result %> <%= result %> <% end %> but this returns all