Consultez la FAQ sur le ZF avant de poster une question
Vous n'êtes pas identifié.
Pages: 1
J'ai un paginator qui fonctionne avec un sélect :
$select->from(array('pers'=>'personne'), array( 'pers_avatar', 'pers_nom', 'pers_nbvideo', 'pers_id')); $select->join(array('pro'=>'profils'),'pers.pers_id = pro.profils_id','pro.profils_type'); $select->join(array('techs'=>'techsports'),'pro.profils_sport = techs.sport_id','techs.sport_sport'); $select->join(array('clu'=>'clubs'),'pro.profils_club = clu.club_id','clu.club_nomclub'); $select->join(array('techd'=>'techdept'),'pro.profils_departement = techd.techdept_id','techd.techdept_numdep'); $select->where(new Zend_Db_Expr('pers_nom LIKE "l%"')); $select->order(array('profils_communaute ASC', 'sport_pop ASC', 'profils_type DESC'));
Et pour le paginator :
$paginator = Zend_Paginator::factory($select); $paginator->setCurrentPageNumber($this->_getParam('page',1)); $paginator->setItemCountPerPage($this->_getParam('page',10)); $this->view->pages = $paginator;
le select ramène pour le test 32 lignes, donc pour le début, j'ai 10 lignes, ça c'est bien, mais quand je clique sur next, je n'ai pas les 10 suivants mais les 3 suivants ... pourquoi ???
Et quand je clique sur 'last' il me balance tout....
Là je ne comprends pas...
Dernière modification par Jean-Marc Rigade (19-04-2009 01:34:56)
Hors ligne
Ok ok ok, je viens de voir mon problème, j'ai paramétré à tort le nombre d'item par page...
Hors ligne
Pages: 1