0
How dynamic data could be displayed in multiple pages.
i want to fetch data from database and display in pageneted view(multiple pages with navigateable links) .
1 ответ
+ 1
Assuming you're doing it on PHP. To start off you could send the page with a get attribute, which will be the number of the page
/page.php?page=2
and page.php should have something like:
// page number
$page = $_GET["page"];
// items per page
$items = 10;
// connect to db
// SQL query
$query = "Select col from table limit " . $page * $items . ", " . $items . ";";
// execute query
// loop through the result of the query building the list of items
https://www.sololearn.com/learn/SQL/1853/