2017 © Pedro Peláez
 

library dbconnect

Jazz framework DbConnect component

image

qwant50/dbconnect

Jazz framework DbConnect component

  • Wednesday, January 31, 2018
  • by qwant50
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Jazz framework DbConnect component README

Most popular framework DbConnect component, (*1)

Override

This is a factory PDO based class. Can store multiple instances of connections. Simple and useful., (*2)

Installation

The preferred way to install this Jazz framework DbConnect component is through composer., (*3)

Either run, (*4)

php composer.phar require "qwant50/dbconnect"

or add, (*5)

"qwant50/dbconnect": "~1.*.*"

to the require section of your composer.json., (*6)

Usage

Get instance

$db = DbConnect::getInstance(['connectionName' => 'db1',
                              'host' => '127.0.0.1',
                              'dbname' => 'test',
                              'username' => 'webuser',
                              'password' => 'xxxxxxxx',]);

Get connection

$db = DbConnect::getInstance(['connectionName' => 'db1',
                              'host' => '127.0.0.1',
                              'dbname' => 'test',
                              'username' => 'webuser',
                              'password' => 'xxxxxxxx',])->getConnection();

Example to usage

$db = DbConnect::getInstance(['connectionName' => 'db1',
                              'host' => '127.0.0.1',
                              'dbname' => 'test',
                              'username' => 'webuser',
                              'password' => 'xxxxxxxx',])->getConnection();
$stmt = $db->prepare("SELECT * FROM table_name WHERE login = :login");
$stmt->bindParam(':login', $login);
$stmt->execute();

The Versions

31/01 2018

dev-master

9999999-dev

Jazz framework DbConnect component

  Sources   Download

MIT

The Development Requires

by Sergey Malahov

13/06 2016

1.0.0

1.0.0.0

Jazz framework DbConnect component

  Sources   Download

MIT

The Development Requires

by Sergey Malahov