How do I show the result of this query using Joomla pagination?

What can I do to display the result of this query in the front using Joomla pagination?

<?php
  $database =& JFactory::getDBO();
  $sql = 'SELECT * FROM #__no_entreprise';
  $database->setQuery( $sql );
  $rows = $database->loadObjectList();
?

      

0


a source to share


1 answer


See Joomla docs - Using JPagination in your component . In short, something like this:



$pageNav = new JPagination( $database->loadResult(), $lim0, $lim );
echo $pageNav->getListFooter();

      

+2


a source







All Articles