> If mastertest is a model
> Mastertest.select("code_ver, result").
> where("code_ver NOT LIKE '%DevBld%'").
> where("date >= DATE_SUB( (CURDATE()) , INTERVAL 90 DAY)").
> order("date DESC")
> You can then call the .paginate on this:
> Not sure what you mean by "ow I want to paginate my
>> results such that each page displays only rows from the last 10 days"
> If you meant you want to only select the records then add another .where()
> On Thu, Nov 1, 2012 at 10:17 PM, Sagar Vikani <sagarvikani2...@gmail.com> wrote:
>> I have a SQL query which looks like this:
>> SELECT code_ver, result FROM mastertest WHERE code_ver NOT LIKE '%DevBld%'
>> AND date >= DATE_SUB( (CURDATE()) , INTERVAL 90 DAY) ORDER BY date DESC;
>> This query gives me results from the last 90 days. Now I want to paginate my
>> results such that each page displays only rows from the last 10 days.
>> Can someone build a query which I can use with the 'will_paginate' ?
>> --
>> You received this message because you are subscribed to the Google Groups
>> "will_paginate" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/will_paginate/-/bN0Aizjmv-oJ.
>> To post to this group, send email to will_paginate@googlegroups.com.
>> To unsubscribe from this group, send email to
>> will_paginate+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/will_paginate?hl=en.
> --
> You received this message because you are subscribed to the Google Groups "will_paginate" group.
> To post to this group, send email to will_paginate@googlegroups.com.
> To unsubscribe from this group, send email to will_paginate+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/will_paginate?hl=en.