Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the difference between MySQL, MySQLi and PDO?

سؤال تثقيفي فقط . ;) .

user-image
Question added by Feras Al-Souri , Web developer. , شركة شفت
Date Posted: 2017/01/23
Rolando Toledo Jr
by Rolando Toledo Jr , Web Developer , IDESS Interactive Technologies Inc.

MySQLi is a replacement for the mysql functions, with object-oriented and procedural versions, It has support for prepared statements.

PDO has been introduced in PHP, and the project aims to make a common API for all the databases access, so in theory you should be able to migrate between RDMS without changing any code (if you don't use specific RDBM function in your queries), also object-oriented.

Mysqli is improved and updated version of mysql, mysql have  more security then mysql, PDO is PHP data object. Php community has been depreciating many interface which used to function for mysql for example mysql_connect.

 

Mysqli have many object oriented feature  you cannot perform any database functions using the PDO extension by itself; you must use a database-specific PDO driver to access a database server. 

 

 PDO does not provide a database abstraction; it doesn't rewrite SQL or emulate missing features.

 

 

 

Owais Akber
by Owais Akber , Senior Accountant , Modec Building Material Trading LLC

Infact you should add 'in php' in your question, 'MySQL' is a rational database system whereas MySQL, mysqli & PDO are the terms used in php for collection of functions & objects to handle database queries in your program.

More Questions Like This