I am trying to display 10 records where the date matches the current month. So say I have records with dates throughout the year. I want to show 10 records starting with those in this current month. If there are only 8 records for the current month, then show me two more from the next month.
I have figured out the sorting by using
'orderBy' => 'Month(domain_registered)',
'limit' => '10',
but that always shows the same first 10 entries. I want it to show 10 entries starting with the current month
Could you supply your complete getRecords call? I suspect your where clause is the issue.
Sorry for the delay. Every I still Google these things as it's faster. Here's my process:
'where' => " domain_registered >= DATE_FORMAT(NOW() ,'%Y-%m-01') ",
Hope that helps!
Dave Edis - Senior Developer