2017 © Pedro Peláez
 

library db

DB library wrapper for PDO class

image

rain/db

DB library wrapper for PDO class

  • Sunday, April 28, 2013
  • by RainElemental
  • Repository
  • 2 Watchers
  • 0 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Rain DB component

Rain DB is a component of the RainFramework 3 that works as wrapper for the PDO class., (*1)

Usage

This class use Static methods to run the queries. Example: ``` php use Rain\DB;, (*2)

// include the autoloader require "library/Rain/autoload.php";, (*3)

// configure the class DB::configure( array("config_dir"=>"config/"); );, (*4)

// init the connection DB::init();, (*5)

// run a query get one row DB::getRow("SELECT * FROM user LIMIT 1");, (*6)


### Installation You can copy this library in your project using composer. After that you need to configure your connection ### Configure connection This class accepts `mysql`, `pgsql`, `sqlite`, `oracle` and `odbc` drivers. The one that the class uses is defined in the configuration file which by default is `config/db.php`, before using the class you need to edit this file and store your database user, password, etc. #### Loading and initializate the library. To load the class file you can use composer or a PSR autoloader. After configurating the class you can initializate the library using the init method ```php use Rain\DB; require "library/Rain/autload.php"; DB::init();

Road Map, todo list and wish list, all of it together!

  • select the type of return as array, object, or class (we may want to create a JSON, XML or YAML class with a method __toString )

The Versions

28/04 2013

dev-master

9999999-dev http://github.com/rainphp/RainDB

DB library wrapper for PDO class

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

pdo db