I have four tables for writing SQL statements related to the multi-table link in PHP and paging processing, tb_bookinfo. Tb_booktype. Tb_bookcase. Tb_publishing. There are correlated fields in these tables. Below is an SQL statement without paging. the output is normal in do... while. The problem is that the data is getting bigger and bigger. now I want to add the paging function. The code has not been successfully modified. please ask PHP about the related fields of the multi-table link in PHP and write SQL statements for paging processing.
I have four tables, tb_bookinfo. Tb_booktype. Tb_bookcase. Tb_publishing. There are correlated fields in these tables. Below is an SQL statement without paging. the output is normal in do... while. The problem is that the data is getting bigger and bigger. now I want to add the paging function. The code has not been successfully modified. please help me with the PHP code. (do not copy the paging code online. please modify the code based on my SQL statement to enable paging) the appendix requires "N records in total, N records are displayed on each page. the current page is N, the first page, the previous page, the next page, and the last page ". Thank you first.
$ Query = mysql_query ("select B. *, c. name as bookcasename, p. pubname, t. typename from tb_bookinfo B left join tb_bookcase c on B. bookcase = c. id join tb_publishing p on B. ISBN = p. ISBN join tb_booktype t on B. typeid = t. id ");
------ Solution --------------------
You can add the limit parameter to implement paging.