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.