Download the PHP package entomb/obj_mysql without Composer

On this page you can find all versions of the php package entomb/obj_mysql. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package obj_mysql

OBJ-MySQL

Latest Stable Version Total Downloads Bitdeli Badge

OBJ MySQL is a simple MySQL Abstraction Layer for PHP>5.2 that provides a simple and secure interaction with your database using mysqli_* functions at its core.

OBJ-MySQL is perfect for small scale applications such as cron jobs, facebook canvas campaigns or micro frameworks or sites.

This project is under construction, any feedback would be appreciated

Author: Jonathan Tavares

checkout the changelog for info on the latest changes

Get OBJ_MySQL

You can download it from here, or require it using composer.

Or you can require it by cloning this repo

If you are already using GIT on you project you can add it as a submodule

Starting the driver

To start the db driver you must include the main class file and pass the '$config' array described bellow. you can have multiple instances of the Class each one with its own $config (one for Reads and one for Writes for example).

Using OBJ_MySQL

there are numerous ways of using this library, here are some examples of the most common methods

Selecting and retrieving data from a table

Inserting data on a table

To manipulate tables you have the most important methods wrapped, they all work the same way: parsing arrays of key/value pairs and forming a safe query

the methods are:

All methods will return the resulting mysqli_insert_id() or true/false depending on context. The correct approach if to always check if they executed as success is always returned

note: All parameter values are sanitized before execution, you don't have to escape values beforehand.

binding parameters on queries

Binding parameters is a good way of preventing mysql injections as the parameters are sanitized before execution.

Using the OBJ_mysql_result Class

After executing a SELECT query you receive a OBJ_mysql_result object that will help you manipulate the resultant data. There are different ways of accessing this data, check the examples bellow:

Fetching all data

Fetching all data works as Object or Array the fetchAll() method will return the default based on the $_default_result_type config. Other methods are:

Aliases

Iterations

To iterate a resultset, you can use any fetch() method listed above

Logging and Errors

Showing the query log. the log comes with the SQL executed, the execution time and the result row count (if any)

To debug mysql errors:

Use $db->errors() to fetch all errors (returns false if no errors) or $db->lastError() for information on the last error.


All versions of obj_mysql with dependencies

PHP Build Version
Package Version
Requires php Version >=5.2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package entomb/obj_mysql contains the following files

Loading the files please wait ....