Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
JayAtHome

Is Pdo Better Or More Secure Than Mysqli?

Recommended Posts

I am not sure on this but I have re-written my website with pdo database access.  It took an a long time to make all the changes and test everything, but I am happy with it.  I just am not sure it was worth the time.  I am asking now before I implement the second site (the ecommerce site).

Share this post


Link to post
Share on other sites

Umm...good question. You might see arguments suggesting PDO is more secure than MySQLI, but I'm not convinced of that. Using bound parameters is more secure than not, regardless of the interface.

 

You'll also see arguments suggesting PDO is "better" than MySQLI. I wouldn't make that argument myself, but I wouldn't think it a mistake to choose PDO over MySQLI. PDO gives you a non-database-specific way to interact with the database but at the cost of losing some database-specific benefits. And, in my experience, the number of times an application is moved from one database backend to another is small. If I were starting a new project today, I could go either way. If I were starting a new project today designed to work with multiple database backends, then I'd definitely use PDO. 

 

You got it working and you learned a few things and you're happy with the end result, so it sounds like it was worth your time!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...