gong023/tiny_mysql

There is no license information available for the latest version (dev-master) of this package.

tiny library to use mysql. single connection, single query.

dev-master 2014-08-18 17:16 UTC

This package is auto-updated.

Last update: 2024-03-27 19:05:19 UTC


README

very very tiny and simple mysql library to execute single query by single connection.

Install

"require-dev": {
    "gong023/tiny_mysql": "dev-master"
}

Usage

$mysqli_result = TinyMysql::execute(
    'mysql query',
    'host to connect',
    'user to connect',
    'password to connect',
    'database to connect',
    'port to connect',
    'socket to connect'
);

or

$singleton_connection = TinyMysql::getInstance($host, $user, $password, $database, $port, $socket);
$mysqli_result = $singleton_connection->query('mysql query');

Mysql Connection is created before you execute query, and mysql connection is closed after query.

Implementation is very simple and tiny. It is suitable for casual use.