Download the PHP package kodols/php-mysql-library without Composer
On this page you can find all versions of the php package kodols/php-mysql-library. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-mysql-library
MySQL Library for PHP
This library will give you access to everything you need from MySQL in PHP.
See our Object Reference to learn what is possible, or view our demo folder for examples.
About
The library is a hybrid between PHP's PDO and generic query building.
Started as a helper class for in-house projects and grown into a usefull tool for Kodols Ltd. A decision was made to make this library public give others the chance to use a well oriented library for database management.
Library will keep getting support and upgrades as this has been become the goto library for Kodols Ltd. to use for our projects.
This library supports access to the native PDO methods, few helper methods to simplify commonly used methods and a query builder to really give you access to build cool statements.
Prerequisites
This library will work on PHP 5.4 or later
Installing
You can clone this git repository into your project
or you can use composer
Deployment
The integration process is very simple, you call the main library class, add a configuration and you are all set.
However we would recommend spend some time to really prepare the environment so you get the best out of this library.
The library is based in src/
with its namespace \Kodols\MySQL
. In our examples we will use a demo variable $KML (Kodols MySQL Library), but of course you can use any variable you like.
Once you have successfuly create the object you need to add MySQL connection details to it. The library supports multiple configurations attached and multiple connections established in the same request.
The $config
variable is \Kodols\MySQL\Configuration
object, see Wiki for in depth details.
Once configuration is created you can attach it to the main library via $KML->attachConfiguration($config);
and start using the library. However if your environment has multiple database endpoints, or maybe you have production, development and local environment, then you can setup it as follows:
So when you call the server variable you can choose with of the server endpoints you want to use.
Contributors
We welcome a good idea, bug fixes, suggestions and requests. This list will be updated every time a new contribution has been made.
- Edgars Kohs - author - Kodols Ltd.
License
This project is licensed under the MIT License - see the https://github.com/kodols/php-mysql-library/blob/master/LICENSE file for details