|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
fontecu Smarty Rookie
Joined: 10 Feb 2005 Posts: 5
|
Posted: Wed Feb 16, 2005 2:36 am Post subject: problems with paginate |
|
|
the error
Code: |
Warning: Smarty error: paginate_prev: total was not set in D:\Usuarios\yaponte\Tesis\Smarty\Smarty.class.php on line 1088
Warning: Smarty error: paginate_middle: total was not set in D:\Usuarios\yaponte\Tesis\Smarty\Smarty.class.php on line 1088
Warning: Smarty error: paginate_next: total was not set in D:\Usuarios\yaponte\Tesis\Smarty\Smarty.class.php on line 1088
|
the code is
Code: |
session_start();
SmartyPaginate::connect();
SmartyPaginate::setUrl($_SERVER['PHP_SELF'] . $variable);
SmartyPaginate::setLimit(5);
$index = SmartyPaginate::getCurrentIndex();
$limit = SmartyPaginate::getLimit();
if (($Nombre != '') or ($Apellidos != '') or ($CI != '')){
$rsBuscarEst=$conn->SelectLimit($query,$limit,$index);
while (!$rsBuscarEst->EOF){
$Estudiantes[] = new EstudianteBusq($rsBuscarEst->fields['Nombre'],$rsBuscarEst->fields['Apellidos'],$rsBuscarEst->fields['País'],$rsBuscarEst->fields['Especialidad'],$rsBuscarEst->fields['CI']);
$rsBuscarEst->MoveNext();
}
if ($rsBuscarEst->RecordCount()<>0){
$visible = true;
}
}
}
$BuscarSmarty = new Smarty();
//$BuscarSmarty->assign('Estudiantes',$Estudiantes);
$BuscarSmarty->assign('visible',$visible);
SmartyPaginate::assign($BuscarSmarty);
$BuscarSmarty->assign('Estudiantes',$Estudiantes);
$BuscarSmarty->display('BuscarEst.tpl'); |
I need some body help me cause i dont know what really happen |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Feb 16, 2005 2:21 pm Post subject: |
|
|
You have to call
SmartyPaginate::setTotal($total);
where $total is the total number of items you are paginating through. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|