I understand, but the problem is that i don't know the columns when writing te code. I get lots of information in a hash, so i have to build the dataset in a loop
Any idea ? On Nov 23, 8:05 pm, Jeremy Evans <[email protected]> wrote: > 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.
