Some people were interested in seeing the code I used to create the pagination for WineLog, which was based on the style of pagination used on sites like Digg and Flickr. I’ve put together a little demo which should help out anyone who is trying to create the same effect on their site.

Comments (2)
Hi, thanks for the code, (pagination code). i managed to customize it, it works well but i keep getting this and i’m unable to fix “Notice: Use of undefined constant num – assumed ‘num’ in C:\xampp\htdocs\KE500\ctest.php on line 58”
56. $query = "SELECT COUNT(*) as num FROM $tbl_name";
57. $total_pages = mysql_fetch_array(mysql_query($query));
58. $total_pages = $total_pages[num];
help please
Thanks for sharing your work. I made a new version that separates the data from the html. This is more suited to templating environments. The code shows a simple text renderer, but would be easy to generate html or whatever.
https://gist.github.com/robmint/e4b037aba1687195524c