Archive by year
Moderator: General Moderators
-
shawngoldw
- Forum Contributor
- Posts: 212
- Joined: Mon Apr 05, 2010 3:38 pm
Re: Archive by year
Well how ar you getting and setting the year?
Re: Archive by year
shawngoldw wrote:Well how ar you getting and setting the year?
Okay, I got it working. It's now paging within the year. To do so I had to add WHERE YEAR(`date`) = '$year'"), 0); to the record count. Now I just need to make it so that the next button gos on to the next year once there are no more rows in the current year. not sure how to implement it. this is what I have.
Code: Select all
if ($current_page === $last_page){
$year = $year+1;
echo " <a href='index.php?year=$year&start=$next'>Next</a>";
} -
shawngoldw
- Forum Contributor
- Posts: 212
- Joined: Mon Apr 05, 2010 3:38 pm
Re: Archive by year
Try with only 2 equal signs. Also print $current_page and $last_page before the if and make sure they are both what you expect them to be.