Page 1 of 1

PDO or MYSQLi?

Posted: Mon Nov 12, 2012 8:47 am
by sendy
hi guys, i dont know if its appropriate to post such topic in this forum but, here's the question:

i read beginning PHP by m*tt doyle, it teaches PDO object for database, then yesterday i came to a discussion about "PDO vs MYSQLi", many say "use PDO" and many say "use MYSQLi".
So, whats the best thing to learn first for beginner? pdo or mysqli? please give your reason why

thx,
Sendy Halim

Re: PDO or MYSQLi?

Posted: Mon Nov 12, 2012 10:13 pm
by MeroD
If you are taking the procedural route, definitely stick with mysqli. If you are learning to code using objects and classes, use PDO.

Regardless, here's some articles on the issue:
http://net.tutsplus.com/tutorials/php/p ... d-you-use/
http://stackoverflow.com/questions/1356 ... s-and-cons
http://www.sitepoint.com/forums/showthr ... -vs-MySQLi

Re: PDO or MYSQLi?

Posted: Tue Nov 13, 2012 6:45 am
by johnj
First time beginner - start with mysqli.

Re: PDO or MYSQLi?

Posted: Tue Nov 13, 2012 9:02 am
by seandisanti
Why worry about best to learn as a beginner? Want to learn it one way when you're new then learn the right way once you've internalized that way? MeroD's answer is spot on, it's a matter of preference based on the way you're programming your project.