如何更改以下代码
try
{
$dbh = new PDO('mysql:host=XXXXXX;dbname=XXXXXX', 'XXXXXX', 'XXXXXX');
}
catch(PDOException $e)
{
print "Error!: " . $e->getMessage() . "<br/>";
die();
}
和这段代码
try
{
$paginate = new pagination($page, 'SELECT * FROM demo_table ORDER BY id', $options);
}
catch(paginationException $e)
{
echo $e;
exit();
}
从 pdo 到 mysqli 以便它们相互对应?