I have the following query in my Rails Controller:
SELECT CODE_VER FROM MASTERTEST WHERE DATE>= DATE_SUB(CURDATE(), INTERVAL 90 DAY) ORDER BY DATE DESC;
This query returns me results from the last 90 days. I display all these results in a table right now.
I want to show only rows from 7 days at a time in some kind of pagination. I have tried will_paginate and kaminari and also paginate_by_sql. But I haven't been successful using any of them so far.
Can someone show me the exact syntax incase of my query?