Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What is the difference between MySQL, MySQLi and PDO?

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

user-image
Question ajoutée par Feras Al-Souri , Web developer. , شركة شفت
Date de publication: 2017/01/23
Rolando Toledo Jr
par 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
par 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

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?