php - trying to switch these staements from pdo to mysqli -


how can change following piece of code

try {     $dbh = new pdo('mysql:host=xxxxxx;dbname=xxxxxx', 'xxxxxx', 'xxxxxx'); } catch(pdoexception $e) {     print "error!: " . $e->getmessage() . "<br/>";     die(); } 

and piece of code

try {     $paginate = new pagination($page, 'select * demo_table order id', $options); } catch(paginationexception $e) {     echo $e;     exit(); } 

from pdo mysqli correspond each other?

i don't see difference database makes pagination code block, based off of you've provided. have done research on mysqli? straightforward.

at rate, code replaces pdo code. pagination code block requires more details before can addressed.

 try     {             $dbh = new mysqli('host', 'username', 'password', 'database');     }      catch(exception $e)     {             echo "error: " $e->getmessage();     } 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -