On Nov 23, 10:34 am, _dewie_ <[email protected]> wrote:
> Say i want to generate the following sql statement with chaining:
>
> select count(*) from certificates
> where (certificates.customer_id = 4) and ((certificate_number ilike
> '%01%') or "location" ilike '%02%')

DB[:certificates].
 filter(:certificates__customer_id=>4).
 filter(:certificate_number.ilike('%01%') | :location.ilike('%02%'))

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to