pets = Pet.find(:all, :conditions => ["owner_id = ?", owner_id]) - find all records with a given field value. [Notes: 1. Returns an array of objects. Check for no records found with: pets.empty?. 2.:conditions => supplies an SQL fragment used with WHERE *]

pets = Pet.find(:all, :conditions => ["name LIKE ?", "Fido%"]) - find all records matching a pattern. Wild cards are % for zero or more of any character, and _ for any single character. To escape a wild card use \% or \_. The reference from MySQL for LIKE will help. On the MySQL Regex website you will find examples for using REGEX.