I have the following SQL query which I use to fetch some rows from a mySQL database :
SELECT code_ver, result FROM mastertest WHERE date >= DATE_SUB( (CURDATE()) , INTERVAL 90 DAY) ORDER BY date DESC;
This query gives me data from the past 90 days. Now I want to display the data of 10 days at a time in my html.erb page (view). I am aware that pagination can be done using 'will_paginate' and 'kaminari' gems. But I am not sure how to query the database with certain conditions as shown above.
Can someone help me with the code here?