Ladies and gentlemen, I'll see if I can change to a support tab.

Source: Internet
Author: User
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) {
?>




No book information!






Add book information

}else{
?>






Add book information
























}while ($result =mysql_fetch_array ($query));}? >
Bar code Book Name Type of book Press Shelf Modify Delete
"> "> Modify The > Delete


------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.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.