Copy CodeThe code is as follows:
Include ("adodb/adodb.inc.php"); Contains the ADODB class library file
Include ("adodb/adodb-pager.inc.php"); Contains the Adodb-pager class library file
$conn = newadoconnection (' mysql '); Create a ADODB object that declares that the database type is MySQL
$conn->connect ("localhost", "root", "1981427", "Test"); Connect to the database, where MyDB is the database name
$sql = "SELECT * from tablename1"; Define the SQL statement to execute
$pager = new Adodb_pager ($conn, $sql); To create a paging object from a Connection object and an SQL statement
$pager->render (3); Output paging page, 3 records per page
?>
Copy CodeThe code is as follows:
Include ("adodb/adodb.inc.php"); Contains the ADODB class library file
Include ("adodb/adodb-pager.inc.php"); Contains the Adodb-pager class library file
$conn = newadoconnection (' mysql '); Create a ADODB object that declares that the database type is MySQL
$conn->connect ("localhost", "root", "1981427", "Test"); Connect to the database, where MyDB is the database name
$sql = "SELECT ID as ' number ', username as ' name ', password as ' password ' from tablename1"; Define the SQL statement to execute
$pager = new Adodb_pager ($conn, $sql); To create a paging object from a Connection object and an SQL statement
$pager->render (2); Output Paging page, 2 records per page
?>
http://www.bkjia.com/PHPjc/320048.html www.bkjia.com true http://www.bkjia.com/PHPjc/320048.html techarticle Copy the code as follows: PHP include ("adodb/adodb.inc.php");//Include ADODB class library file include ("adodb/adodb-pager.inc.php"); Contains Adodb-pager class library file $conn = Newadoconnec ...