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

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -