Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   MySqli or PDO? (https://www.warriorforum.com/programming/817703-mysqli-pdo.html)

kevbo22 20th July 2013 07:16 PM

MySqli or PDO?
 
Both solutions are good. MySqli can only use MySql. PDO can use 12 different databases. PDO seems to be more object oriented while MySqli seems more procedural. Both have prepared statements. What do you prefer?

Andrew H 20th July 2013 08:47 PM

Re: MySqli or PDO?
 
Obviously PDO

PDO vs. MySQLi: Which Should You Use? | Nettuts+

SteveSRS 21st July 2013 09:17 AM

Re: MySqli or PDO?
 
PDO for me too.. your statement about object oriented / procedural isn't right btw. Mysqli supports both and PDO is a wrapper and thus only object oriented.

wayfarer 22nd July 2013 06:32 AM

Re: MySqli or PDO?
 
I've never been crazy about PDO, but it's about as good as it comes as far as an ORM for PHP. As long as you get past the learning curve, it's a pretty safe bet, even if you don't need to switch database engines. I've usually used mysqli or mysql extensions, which are built in, mostly just because I've done a bunch of PHP deployments on simple shared servers that don't even have PDO. So in all honesty, if you're doing a lot of PHP, it's good to know both.

When I have complete control over my server environment, and am doing a larger deployment, I don't even use PHP any more. There are much better ORMs for Python, at least in my experience. Mostly I use the Django ORM, but am learning SQLAlchemy also.

kiash001 25th July 2013 08:53 PM

Re: MySqli or PDO?
 
PDO is the best!


All times are GMT -6. The time now is 02:41 AM.