I have the below code that will calculate number of records in the table inside my DB. What i need to do now is to show 5 records each time and have number under that to show next records like 1 2 3 ...
Code: Select all
<?php
// You can place PHP like this
$db = JFactory::getDBO();
$query = "SELECT SQL_CALC_FOUND_ROWS * FROM tbl_userlogs";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$db->setQuery('SELECT FOUND_ROWS();');
$count = $db->loadResult() ;
echo $count;
?>