Should I use php PDO or normal mysql_connect to execute database queries in PHP?
Which one is faster?
One of the big benefits of PDO is that the interface is consistent across multiple databases. There are some cool functions for prepared statements too, which take some of the hassle out of escaping all your query strings. The portability of PDO is greater than mysql_connect.
So, should I use PDO for those reasons or stick to the traditional mysql_connect?
mysql_*
functions as they are deprecated (see red box at the top ofmysql_connect
. – Carlos Campderrósmysql_*
functions and also it describes how to go about implementing PDO if you're already using them. – Joe Meyer