Copy code The code is as follows:
include("adodb/adodb.inc.php"); /Include the adodb class library file
include("adodb/adodb-pager.inc.php"); //Include the adodb-pager class library file
$conn = NewADOConnection('mysql'); //Create adodb Object, 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 be executed
$pager = new ADODB_Pager($conn, $sql); //Create a paging object based on the connection object and SQL statement
$pager ->Render(3); //Output paginated pages, 3 records per page
?>
Copy the code The code is as follows:
include("adodb/adodb.inc.php"); //Include adodb class library file
include("adodb/adodb-pager.inc.php"); //Include the adodb-pager class library file
$conn = NewADOConnection('mysql'); //Create an adodb object and declare the database type to be 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 be executed
$pager = new ADODB_Pager($conn, $sql); //Create based on the connection object and SQL statement Paging object
$pager->Render(2); //Output the paging page, 2 records per page
?>
http://www.bkjia.com/PHPjc/320048.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/320048.htmlTechArticleCopy the code as follows: ?php include("adodb/adodb.inc.php"); //Include adodb Class library file include("adodb/adodb-pager.inc.php"); //Include adodb-pager class library file $conn = NewADOConnec...