Ad block is installed and active. Please support us by disabling it.
HomeSaturday, January 20, 2018, 16:49:55

Smarty Paginate Example - Smarty Pagination with PHP

Monday, February 9, 15, 02:08:43, 3 Yaers Ago Via wain, Hits: 4343
Smarty Paginate Example, Smarty Pagination with PHP. SmartyPaginate: a class/plugin for data set pagination within the Smarty template environment
Resource Smarty Paginate:


function get_db_results()
$id = $_GET['id'];
$_query = sprintf("SELECT SQL_CALC_FOUND_ROWS * FROM links WHERE linkname LIKE '%%$id%%' LIMIT %d,%d", SmartyPaginate::getCurrentIndex(), SmartyPaginate::getLimit());
$_result = mysql_query($_query);
while ($_row = mysql_fetch_array($_result, MYSQL_ASSOC)) {
$_data[] = $_row;
$_query = "SELECT FOUND_ROWS() as total";
$_result = mysql_query($_query);
$_row = mysql_fetch_array($_result, MYSQL_ASSOC);
return @$_data;
require ('libs/SmartyPaginate.class.php');
$smarty->assign('results', get_db_results());


{section name="results" loop=$results}
{$results[results].linkname}<br />

Links {$paginate.first}-{$paginate.last} of {$}.
{paginate_prev} {paginate_next}

jeremy Monday, November 19, 2012, 15:50:07

Thank you for useful code example

Sign In



Link Base 1.1. - Free PHP Link Index Script

Manage your links using a MySQL database. Features easy install, user submission, and an admin panel to add, edit and remove categories and links.

Captcha V1 - Free PHP Script

An anti-spam form protection image written in PHP, Version: 1.1.

Show / Hide Div with CSS

CSS Display and Visibility:The visibility property specifies whether or not an element is visible.

MySQL Basic Functions

MySQL Basic Functions - select, delete, update..

PHP Cookies - setcookie

Defines a cookie to be sent along with the rest of the HTTP headers.

PHP Mail

Sends an email.

Link Base Pro :: Free Link Index Script

This script allows you to manage your links using a MySQL database. It features easy install, user submission, and an admin panel to add, edit and remove categories and links.

Creating a Math CAPTCHA with PHP - PHP Tutorial

This tutorial will show you how to create a form with Math Captcha.

PHPBB3 Shoutbox

Vesion: 1.1. Released: 08/08/10, Licence GNU, Price: Free

How to set up password for phpMyAdmin in Wamp Server

Password for phpMyAdmin in Wamp
About Author


Date Registered: Sun, Feb 8, 15
Last Time Online: Thu, Jun 15, 17
So far has created 115 entries.
This author has not yet filled in any details.