MySQLi is good tbf, personally i dont use it because i tend to built my database abstraction layers myself around MySQL but for simple applications i would go with mysqli
but for larger applications where you have query caching etc i think overall it much easier to go with the stranded version
MySQL Lib is old, it shouldn't be chosen over MySQLi in any circumstances really.
MySQL Lib = old & lacks new functionality
MySQLi = new & restricted to MySQL
PDO = new & works on almost any DB
So you should generally use PDO over anything for portability.
Though half of you probably don't even know PDO exists.
I never use the mysql or mysqli libraries in my code now, it'd be an illogical decision to do so when you can have complete portability with PDO. You can code your script to use PDO so if you ever switch DB, you only change the connection, not the queries.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.