2017 © Pedro Peláez
 

library db

Database Connection Library

image

minphp/db

Database Connection Library

  • Monday, November 30, 2015
  • by clphillips
  • Repository
  • 3 Watchers
  • 0 Stars
  • 287 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 3 Open issues
  • 4 Versions
  • 9 % Grown

The README.md

minphp/Db

Build Status Coverage Status, (*1)

Database Connection Library., (*2)

Efficiently manages a connection, preventing a new one from being established if a matching connection already exists., (*3)

Installation

Install via composer:, (*4)

composer require minphp/db:dev-master

Basic Usage

use Minphp\Db\PdoConnection;

$dbInfo = array(
    'driver' => 'mysql',
    'host' => 'localhost',
    'database' => 'databasename',
    'user' => 'user',
    'pass' => 'pass'
);

$connection = new PdoConnection($dbInfo);
$connection->query('SELECT * FROM table WHERE id=?', 1);

Explicitly Connecting

By default, PdoConnection will only connect to the database when a connection is required. To explicitly connect to the database use connect():, (*5)

use Minphp\Db\PdoConnection;

$dbInfo = array(
    'driver' => 'mysql',
    'host' => 'localhost',
    'database' => 'databasename',
    'user' => 'user',
    'pass' => 'pass'
);

$connection = new PdoConnection($dbInfo);
$connection->connect();
// Connection now ready and waiting

The Versions

30/11 2015

dev-master

9999999-dev http://github.com/phillipsdata/minphp-db

Database Connection Library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Cody Phillips

30/11 2015

2.0.1

2.0.1.0 http://github.com/phillipsdata/minphp-db

Database Connection Library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Cody Phillips

30/11 2015

2.0.0

2.0.0.0 http://github.com/phillipsdata/minphp-db

Database Connection Library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Cody Phillips

01/07 2015

1.0.0

1.0.0.0 http://github.com/phillipsdata/minphp-db

Database Connection Library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Cody Phillips