Hardware environment: PIII550,128M,15.2G
Software Environment: Win98+apache+php4+mysql
Programme one:
1. First query with select COUNT (1) from Tab where condition gets the number of records that satisfy the condition $rows
2. Number of records per page $RPP retrieving the recordset with the previous pages $page
SELECT * from tab where condition limit ($page-1) * $RPP, $RPP
3. Displays all records that return a recordset.
4. $rows is passed to the next page when the page is transferred.
Scenario Two:
1. Retrieve the recordset that meets the criteria
SELECT * from tab where condition
2. Move the pointer to ($page-1) * $RPP
3. Show $RPP Records
==============+======+==============================================+======+======+========
Number of records | Solutions | Count 1 2 3 4 5 6 7 8 9 0 | Average | Average | Efficiency ratio
==============+======+==============================================+======+======+========
| | First page 2, 1, 1, 2, 1, 1, 2, 2, 1, 2 | 1.3 | |
| One +----------------------------------------------+------+ 1.6 |
10,000 Records | | Other pages 2, 2, 2, 3, 1, 1, 2, 2, 2, 2 | 1.9 | | 4.8125
http://www.bkjia.com/PHPjc/631068.html www.bkjia.com true http://www.bkjia.com/PHPjc/631068.html techarticle hardware environment: PIII550,128M,15.2G Software Environment: Win98+apache+php4+mysql Scenario One: 1. First query with select COUNT (1) from Tab where condition Get the number of records that meet the criteria ...