PHP Classes

Good and simple MySQL wrapper: What MySQL wrapper should I go with?

Recommend this page to a friend!
  All requests RSS feed  >  Good and simple MySQL wrapper  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

Good and simple MySQL wrapper

Edit

Picture of Y D by Y D - 10 years ago (2014-10-27)

What MySQL wrapper should I go with?

This request is clear and relevant.
This request is not clear or is not relevant.

+6

I'm looking for a good simple to use MySQL wrapper.

There are many here. From your experience what should I go with?

Ask clarification

5 Recommendations

MySQL Class Generator: Generate classes to access MySQL as objects

This package can automatically generate PHP classes from MySQL tables.

It can access a given MySQL database and retrieve schema tables and fields.

For each table, it generates a class that uses object-oriented programming logic to provide methods for accessing, reading, and writing its records.
This recommendation solves the problem.
This recommendation does not solve the problem.

+3

Picture of Saro Carvello by Saro Carvello package author package author Reputation 515 - 8 years ago (2017-02-14) Comment

This package can automatically generate the classes source code for all database tables. It uses the mysqli object.


PDO4You: Access SQL databases using the PDO extension

This class implements the singleton design pattern to access SQL databases using the PDO extension.

It can connect to several possible SQL databases using the available PDO drivers. Currently it supports MySQL, PostgreSQL, SQLite, MariaDB, CUBRID, Oracle, Microsoft SQL Server, Sybase.

The class can also execute multiple queries at once given a string in JSON format that specified the type of query, the tables, fields, field values, conditions, etc..
This recommendation solves the problem.
This recommendation does not solve the problem.

+4

Picture of Giovanni Ramos by Giovanni Ramos package author package author Reputation 45 - 10 years ago (2014-10-28) Comment

Try this class which uses the power of the PDO, which offers support for MySQL and PostgreSQL, and most other popular dbs. It may be useful to you in terms of portability.


SlimDb: Access different database types using PDO

This package can be used to access different database types using PDO.

The main class can connect to a given database using PDO.

It takes configuration parameters to determine what driver it should call. Drivers are defined as arrays of functions that implement each of the supported driver operations. Currently there are drivers for MySQL and SQLite.

It supports operations like executing arbitrary SQL queries using prepared statements, retrieving results into arrays, get the last inserted table record identifier and get the metadata of a table.

There is a separate class for executing common SQL INSERT, UPDATE, DELETE and SELECT queries from lists of parameters that define tables, fields, field values, conditions, etc..

Another separate class can perform Object-Relational Mapping by storing and retrieving information in database table records mapped to class objects.
This recommendation solves the problem.
This recommendation does not solve the problem.

+3

Picture of marcelo entraigas by marcelo entraigas package author package author Reputation 40 - 10 years ago (2014-10-28) Comment

Hello, I wrote a a package with that in mind. Hope you find it useful.


PHP Mass Database Update: Update all MySQL database table records

This class can update all MySQL database table records.

It can retrieve the list of tables of a given MySQL database and generate a HTML form to let the user choose the tables and fields he wants to update.

The class takes the submitted form values and executes a SQL UPDATE query to change the table field specified by the user.
This recommendation solves the problem.
This recommendation does not solve the problem.

+2

Picture of amani by amani package author package author Reputation 70 - 10 years ago (2014-10-28) Comment

This class can update all MySQL database table records.

It can retrieve the list of tables of a given MySQL database and generate a HTML form to let the user choose the tables and fields he wants to update.

The class takes the submitted form values and executes a SQL UPDATE query to change the table field specified by the user. With this class you can use a good interface to update and change table fields values very fast and easy via ajax. In this class you have some option to choose table records with theme value very simple.


Metabase: PHP Database abstraction layer RDBMS independent

Package of classes that provide DBMS independent access and management of databases.

Currently it features:

o BSD style license.

o Dual API call forms:
* Direct driver class object calls
* Global function calls

o Set of functions that call the selected DBMS driver objects functions supporting when possible:
* Database connection setup with support for connection strings
* Operation error handling
* Query constant data conversion
* Direct queries
* Prepared queries
* Query result rows random access
* Retrieve a limit range of rows of a SELECT query.
* Nested transactions
* Large object fields (BLOBs - storing files in the database)
* Database object creation (tables, indexes, sequences)
* DBMS driver supported feature query

o DBMS Drivers classes that support the most important databases being used on the Web.

o Driver conformance test suite to verify if the driver classes are working and features are properly implemented.

o A parser class that is able to interpret DBMS independent database schemas file defined in a custom XML format supporting the following types of objects:
* Tables with fields of the types: text, integer, boolean, date, time, timestamp, decimal, float, character large objects (CLOBs) and binary large objects (BLOBs), auto-increment.
* Primary keys
* Indexes
* Auto incremented sequences

o A manager class that is able to:
* Install a new database from a schema description interpreted by the parser class.
* Ability to compare a previously installed schema with a new schema and only install the changes without affecting data stored after the previous installation or update.
* Dump database structure and contents in the same XML format handled by the parser allowing for moving data between databases of different DBMS vendors.
* Reverse engineer schemas of already installed databases

o Driver classes for multiple databases:

* MySQL using the traditional MySQL extension or MySQLi
* PostgreSQL
* Oracle using oci extension
* Microsoft SQL server using the mssql extension
* SQLite
* Generic ODBC base driver
* MS Access using ODBC
* Interbase
* Informix
* MiniSQL
This recommendation solves the problem.
This recommendation does not solve the problem.

+3

Picture of Manuel Lemos by Manuel Lemos package author package author Reputation 26695 - 10 years ago (2014-10-27) Comment

I have been using this package to access databases for many years.

It can work to access MySQL and other databases that you do not need, but provides also other interesting features.

For instance it can install the schema of the database tables from a file that describes the tables. Then if you need to change the tables, for instance adding, removing, renaming tables, fields or indexes, just change the definition of the schema in the same file and tell Metabase to upgrade your schema.

It is very safe, as it will tell you in advance if you want to perform a database schema change that is not supported, it will tell you in advance so it does not perform part of the changes and leave your database schema inconsistent.

Putting the database schema definition on a description file is also useful to keep your database changes under your GIT or other version control system that you use.


Recommend package
: 
: