php分页用PDO怎么写,有没有同学会的
<?php
/* Connect to an ODBC database using driver invocation */
$dsn = 'mysql:dbname=xb;host=127.0.0.1';
$user = 'root' ;
$password = '123456';
try {
$dbh = new PDO ( $dsn , $user , $password );
} catch ( PDOException $e ) {
echo 'Connection failed: ' . $e -> getMessage ();
}