| | #1 |
| PHP ninja War Room Member Join Date: 2011 Location: Denver
Posts: 124
Thanks: 13
Thanked 27 Times in 25 Posts
|
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?
|
| |
| | #2 |
| Web Developer War Room Member Join Date: 2012 Location: Vancouver, BC
Posts: 593
Thanks: 149
Thanked 162 Times in 133 Posts
| |
| |
| |
| | #3 |
| Software Product Creator War Room Member Join Date: 2012 Location: NL => Thailand
Posts: 452
Thanks: 42
Thanked 164 Times in 93 Posts
Blog Entries: 5 |
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.
|
| Recurring Proven SEO Business Model Rent Out Your (Local) Sites and YT vids Give you AD Funnel Super Power! ADConnect.io - Lower CPC. Sky-Rocket Conversions!! | |
| |
| | #4 |
| Software Engineer War Room Member Join Date: 2008 Location: Asheville, NC USA
Posts: 693
Thanks: 37
Thanked 112 Times in 100 Posts
|
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. |
| I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs | |
| |
| | #5 |
| Warrior Member Join Date: 2011 Location: Dhaka, Bangladesh
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
PDO is the best!
|
| | |
| |
|
| Bookmarks |
| Tags |
| mysqli, pdo |
| |