When we look at new DB connection / query objects, trying to decide who to write to or use new libraries for, we decided it was better to write our own. In the end, it probably does not have the flexibility available to many other libraries, but we added functions such as GetAll() , which extracts all the rows in the array with keys or GetAllKeyed() , which returns an array with the key with the identifier as key . Another great GetOne() option to use when your selection has only 1 column. All this significantly reduced the amount of code.
Another feature is that when you execute a query, it determines what type of query it is ( INSERT , UPDATE , SELECT , DELETE , etc.), and then returns the relevant information (for example, INSERT , last insert identifier, or DELETE number of rows deleted).
But we also copied features like Prepare and Execute from PEAR: DB.
source share