What is the best PHP MYSQL wrapper?

I have bounced between various wrappers, my own and using direct php mysql functions over the years, but I'm sure there is a really good solution there. What is it?:)

EDIT: You only need to connect to MYSQL.

+4
source share
7 answers

A very subjective question, can you prioritize your requirements ... should it be easy, portable (for other databases), etc.?

I usually use ADODB , not least because it provides excellent database abstraction and is therefore very portable.

+6
source

I use PDO with my own shell. I used to use goBD for MySQL (extends MySQLi), but all documents are only in Russian.

+4
source

For large projects, I usually use Doctrine as a relational object mapping. It also provides an abstraction for β€œnormal” SQL queries, but it can do much more.

This can definitely make the development more painless. As a result, you can create complex applications without a single line of SQL code.

For small scripts where Doctrine would just be redundant, I just stick with the PHP built-in PDOs.

+4
source

if you only want MySQL, then Zebra_Database , which is lightweight, has an impressive debugging console to display detailed information about the queries you run, can cache the query results either on disk or in memcache, and it is easy to learn and use.

+1
source

I just use my own simple shell here .

No funny stuff .. no complications. Just a simple Singleton php-mysql wrapper class.

I also have examples given here.

Take a look .. its free and very useful.

0
source

I would recommend my AMysql library, which was inspired by all the good parts of PDO, mysqli and Zend Framework 1, but uses mysql_* functions.

https://github.com/amcsi/amysql

It supports PHP 5.2.4+, can execute prepared statements with and without a client name. It is not too small for creating select statements, but it does for deleting, updating, and pasting (it can do several attachments and updates in the same call), and is great for you to determine how you want to get results by to choice.

It is also set by the composer. Here is his page in the folder: https://packagist.org/packages/amcsi/amysql

0
source

I came across a real beautiful structure called Baptism. Database wrapper is extremely easy to use or added. The documentation is also great. If you are looking for an easy solution, I recommend this framework or at least check out the EpiDatabase.php file.

https://github.com/jmathai/epiphany

If you need something with a lot of features, in the next I would recommend the Yii Framework, and if that doesn't cut, then the Zend Framework. Just sing around these database wrappers and you will find the one you like.

http://www.yiiframework.com/

http://framework.zend.com/

0
source

Source: https://habr.com/ru/post/1308215/


All Articles