How is PDO better than mysqli for a dev that sticks to just MySQL?
Commit
fd7ecab
MySQLi is exclusive to MySQL, supports procedural and object-oriented programming, uses only positional parameters (?), and by default does not include error handling.
PDO offers support for multiple databases. It is 100% object-oriented. It supports both positional (?) and named (:name) parameters in its queries, and by default it uses try/catch exceptions, which provides more granular error handling.
PDO is more convenient for prepared statements and preventing SQL injection; it has domain exceptions, everything is handled via methods, and it is currently recommended to use PDO even if you’re working with MySQL. Most modern code uses it.
commit fd7ecab