Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 20th Jul 2013, 07:16 PM   #1
PHP ninja
War Room Member
 
kevbo22's Avatar
 
Join Date: 2011
Location: Denver
Posts: 124
Thanks: 13
Thanked 27 Times in 25 Posts
Default
MySqli or PDO?
Share on: 
fb share twitter share gplus share more share

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?
kevbo22 is offline  
Unread 20th Jul 2013, 08:47 PM   #2
Web Developer
War Room Member
 
Andrew H's Avatar
 
Join Date: 2012
Location: Vancouver, BC
Posts: 593
Thanks: 149
Thanked 162 Times in 133 Posts
Default
Re: MySqli or PDO?
Share on: 
fb share twitter share gplus share more share

Obviously PDO

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

"You shouldn't come here and set yourself up as the resident wizard of oz."
Andrew H is offline  
Unread 21st Jul 2013, 09:17 AM   #3
Software Product Creator
War Room Member
 
SteveSRS's Avatar
 
Join Date: 2012
Location: NL => Thailand
Posts: 452
Thanks: 42
Thanked 164 Times in 93 Posts
Blog Entries: 5
Default
Re: MySqli or PDO?
Share on: 
fb share twitter share gplus share more share

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.

SteveSRS is offline  
Unread 22nd Jul 2013, 06:32 AM   #4
Software Engineer
War Room Member
 
wayfarer's Avatar
 
Join Date: 2008
Location: Asheville, NC USA
Posts: 693
Thanks: 37
Thanked 112 Times in 100 Posts
Default
Re: MySqli or PDO?
Share on: 
fb share twitter share gplus share more share

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
wayfarer is offline  
Unread 25th Jul 2013, 08:53 PM   #5
Warrior Member
 
Join Date: 2011
Location: Dhaka, Bangladesh
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: MySqli or PDO?
Share on: 
fb share twitter share gplus share more share

PDO is the best!

kiash001 is offline  
Closed Thread


Bookmarks

Tags
mysqli, pdo


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




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