Dear teachers, please help me see if it can be changed to support pagination. & Lt ;? Phpinclude (& quot; Conn/conn. php & quot;); $ query = mysql_query (& quot; selectbook. barcode, book. idasbookid, book. bookn instructors, help me see if I can change it 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 join tb_booktype bt on book. typeid = bt. id join 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 |
Book type |
Press |
Bookshelves |
Modify |
Delete |
| |
"> |
|
|
|
"> Modify |
"> Delete |
} While ($ result = mysql_fetch_array ($ query ));}?>
------ Solution --------------------
It can be changed. There are a lot of code to be changed. it is not difficult to clear the clues from the beginning to the end.
1: What are the page IDs and two parameter-specific URLs? StartPostion = 0 & number = 10
StartPostion start position, number of entries at a time
2: query conditions
$ SqlString = "select * from myTable1 where 1 limit $ startPos, $ num ";
// This sentence is half done.
3: generate the following pages. link between the previous page and the next page
I understand that all of them are physically active.
Have I made it clear?
------ Solution --------------------
The page is actually clear
1. current page
2. number of entries displayed on each page
You can.
Use the preceding two conditions to write SQL statements.