Teachers, help me see if I can change to support pagination.
Include ("conn/conn.php");
$query =mysql_query ("Select Book.barcode,book.id as Bookid,book.bookname,bt.typename,pb.pubname,bc.name from Tb_ BookInfo book joins Tb_booktype BT on Book.typeid=bt.id joins tb_publishing PB on book. ISBN=PB. ISBN join tb_bookcase BC on Book.bookcase=bc.id ");
$result =mysql_fetch_array ($query);
if ($result ==false) {
?>
}else{
?>
Bar code |
Book Name |
Type of book |
Press |
Shelf |
Modify |
Delete |
|
"> |
|
|
|
"> Modify |
The > Delete |
}while ($result =mysql_fetch_array ($query));}? >
------Solution--------------------
Can change, change the code a bit more, from the beginning to the end, clear the difficulty of the clue
1: Pagination identification with two parameters Cardin url?startpostion=0&number=10
Startpostion start position, number one bar
2: Query criteria
$sqlString = "SELECT * from MyTable1 where 1 limit $startPos, $num";
You know, that's half the truth.
3: Generate pages from the bottom page and the next page with corresponding links
You know, it's all about physical activity.
Did I make it clear?
------Solution--------------------
Pagination actually make it clear
1, the current page
2. Display number per page
You can do it.
Write the SQL statement using the above 2 conditions.