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
PDO database connection code:
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch(PDOException $e) { echo "Connection error: ".$e->getMessage(); } ?>
Normal MySQL database connection code:
or
MySQL database connection code easy but PDO has many advantage.