Automatic Query Pagination
Automatic Pagination Using query_count And Limit Control !
Simply place then into a function and query a count from the database, and assign $total to your query returned value
$total = $result_count['value'];
//querymsql_count as $total then devide by rows !
$rows = 10; // how many rows to show on each page !
$total = 50; //taken from query_count rows in database.
$count = ($total / $rows); //devide $total by $rows and pass this for pagination foreach
foreach (range('1', ''.$count.'') as $char) {
print '' . $char . ' | ';
}
?>
No comments:
Post a Comment