The Right Guide for PDO

MySQL is an extremely powerful database and it comes with many flavours and options… It can thus, be hard understanding the absolute best approach based on your implementation decisions. What worked for MySQL does not work the same for MySQLi. Equally, MySQLi is quite different from MySQL PDO.

I suggest reading “PDO vs MySQLi – which should you use” for more information on the differences between MySQLi and PDO. My preference is PDO, but you may decide MySQLi is better for your situation.

Some differences include:

  • MySQLi only supports MySQL Databases whilst PDO acts as an abstraction layer, thus supporting numerous different database drivers.
  • PDO supports named parameters, whilst MySQLi doesn’t.

Most critically – Both of them support SQL injection security, but only if the developer uses them in the way they were intended.

It is thus good to have one single complete reference for your choice. I prefer PDO, so suggest reading “(The only proper) PDO tutorial” to ensure that you use the correct implementation intended for PDO.

Perhaps you know of a good complete reference for MySQLi? Let me know and I will add it here.

About Anto

Hi, my name is Anto! I am a cloud computing hobbyist! Give me anything to do with the cloud, and I am interested. I work for a Cloud computing company by day and as a Cloud computing hobbyist by night! My projects use PHP, NodeJs, Ubuntu, MySQL and of course Amazon Web Services. Hopefully, my blog aids your cloud journey! Feel free to post a comment and share your thoughts.

View all posts by Anto →

Leave a Reply

Your email address will not be published. Required fields are marked *