Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 9
Joined: Thu Oct 25, 2012 9:47 pm

Mon Nov 12, 2012 8:47 am

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

Sendy Halim
php-forum Fan User
php-forum Fan User
Posts: 53
Joined: Wed Oct 10, 2012 12:14 am

Mon Nov 12, 2012 10:13 pm

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
php-forum GURU
php-forum GURU
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Tue Nov 13, 2012 6:45 am

First time beginner - start with mysqli.
php-forum GURU
php-forum GURU
Posts: 974
Joined: Mon Oct 01, 2012 12:32 pm

Tue Nov 13, 2012 9:02 am

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.
Post Reply