是的,我是另一个人来回答这个烦人的问题……但到目前为止我还不相信,所以就这样吧!
我正在研究一个严重依赖 MySQL 和 PHP 的项目,它使用与 php/mysql/setup 一起打包的标准 mysql 函数,因此没有“额外酷的东西”。
我应该将引擎更改为像 MariaDB 或类似的替代品,还是只使用 mysqli?或者像 PDO 之类的东西?
当涉及到整体性能和可用性时,任何替代方案以及最终“更好”的东西都是很好的了解。
PDO,因为它不仅支持 MySQL。而 MySQLI 显然只支持 MySQL。如果您使用 PDO,您将更容易从 MySQL 过渡到例如 PostgreSQL。
If you want to rewrite the entire database logic I recommend you to give a try to Doctrine2 ORM. It is really powerful and handle a lot of DBM (through PDO or custom connectors in order to support MongoDB in example).
If you don't, PDO might be your best option.