Page 2 of 2
Re: Archive by year
Posted: Sat Aug 21, 2010 6:31 pm
by shawngoldw
Well how ar you getting and setting the year?
Re: Archive by year
Posted: Sun Aug 22, 2010 11:38 am
by aghast
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>";
}
but it's not working
Re: Archive by year
Posted: Sun Aug 22, 2010 11:55 am
by shawngoldw
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.