<?php
include('pi_lib/PaginatorIterator.php');
$mysql=@mysql_connect('localhost', 'root', '123456', 'j15') or die('Cant connect');
mysql_select_db('j15', $mysql);
#$db=new PDO('mysql:dbname=j15;host=127.0.0.1', 'root', '123456');
PaginatorIterator::setHandlerFunc('mysql'); # defaults to pdo
PaginatorIterator::setConnection($mysql);
include('Smarty-2.6.19/Smarty.class.php');
$smarty=new Smarty;
$smarty->plugins_dir[]="./plugins";
$smarty->assign('ds', "select * from jos_menu limit :LIMIT offset :OFFSET");
$smarty->assign('numrows', "select count(*) from jos_menu");
$smarty->display("example.tpl");
?>
|