I have been using php for quite a sometime now and encounter three different interfaces viz. mysql_*, mysqli_* and PDO to connecting with mysql database. What i am not able to understand is why to have so many interfaces for the same.. if one is better then which one?? or is it a matter of choice between select one or other. Does there exists any difference in performance and speed with each of the interfaces?
I have been using php for quite a sometime now and encounter three different
Share
While mysql (procedural) and mysqli (OO) are MySQL client libraries, PDO is a data-access abstraction layer, it allows you to use different database drivers. An advantage of PDO is you could, theorically, change your database driver without rewriting your querying code.
I recommend you to check http://php.net/manual/en/mysqli.overview.php where differences between those 3 libraries are briefly discussed.