Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (10 sloc) 376 Bytes

Ruby

In Ruby on Rails using ActiveRecord:

Person.find :all, :conditions => ['id = ? or name = ?', id, name]

or

Person.find_by_sql ['SELECT * from persons WHERE name = ?', name]

Using Ruby/DBI: analog to Perl.

To do

  • Add some narrative.