The following is a simple php template for connecting to the mysql database to display data by page. you can modify the information according to the description, and the SQL statements in the template can be modified by yourself.
Pay attention to the analysis and observation of the code writing and implementation of the relevant paging part.
$ Link = mysql_connect ('localhost', 'root', '') or die ('MySQL database connect error ');
Mysql_select_db ('your database') or die ('The selected database is not exist ');
?>
// Insert your html code here,
$ SQL = 'SELECT count (*) count from your_table ';
$ Result = mysql_query ($ SQL) or die (mysql_errno (). ":". mysql_error (). "n ");
$ Rs = mysql_fetch_object ($ result );
$ RecountCount = $ rs-> count;
$ Show = 20;
$ TotalPage = ceil ($ recountCount/$ show );
$ Page = (isset (Advanced Materials-webmaster College
Future Chinese webmasters will focus more on the development of China's networksAdvertisement service | latest update | add to favorites | set as Homepage
- Homepage
- Internet software
- IDC products
- Webmaster transaction
- Project outsourcing
- Business Information
- Recruitment
- Company Database
- Webmaster Mall
- Asset Information
- Downlink
- School
- Work Tools
- Tan
Popular keywords:For CSS layout color, see Dreamweaver8 apacheApacheIIS6AjaxWML
Homepage | HOME webmaster getting started operation planning search optimization website profit webpage design HtmlCSS/XhtmlDhtmlWAPDreamweaver design principles graphic animation photoshopFireworkFlash website development Asp. NetPhpJspMssqlAccessOracleMysql server FressbsdLINUXWindows
Video tutorial |
Frequently used manual |
Common advertisement code |
Js special effect code |
Webmaster College> Website Development technical tutorial> mysql tutorial> Advanced Materials
Advanced Materials
21:18:00 view learning experience
{GetProperty (Content )}