Connection DBMS: Connect to databases using PDO or MySQLi

Recommend this page to a friend!
  Info   Documentation   View files (8)   Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 384 All time: 6,581 This week: 298
Version License PHP version Categories
connection_dbms 1.1.1MIT/X Consortium ...5PHP 5, Databases, Libraries
Description Author

This package can connect to databases using PDO or MySQLi.

It provides two classes: one to connect to a database using PDO and another to connect to MySQL using MySQLi.

Both classes can execute prepared queries from parameters and return the results in arrays.


PDO Class
I need a class to connect to my db (mysql). Now my code is a old

Picture of Leonardo Mauro Pereira Moraes
  Performance   Level  
Name: Leonardo Mauro Pereira ... <contact>
Classes: 3 packages by
Country: Brazil Brazil
Age: 26
All time rank: 2862211 in Brazil Brazil
Week rank: 771 43 in Brazil Brazil


Connection Instruction

This package have classes to connection and queries for Database Management System (DBMS [or SGBD, in Portuguese]). Currently it can connect to a database using MySQLi or PDO extension and execute several types of queries from parameters that define tables, fields, values and conditions.


  • /php/connection/MysqliInstruction.php `MysqliInstruction()`
  • /php/connection/PDOInstruction.php `PDOInstruction()`



/Autoload Include/
use \Connection\MysqliInstruction;

$mysqli = new MysqliInstruction();
$resp = $mysqli->select('SELECT * FROM table WHERE id < ?', array('10'));
$resp = $mysqli->generic('DELETE FROM table WHERE id = ?', array('2'));


/Autoload Include/
use \Connection\PDOInstruction;

$pdo = new PDOInstruction();
$resp = $pdo->select('SELECT * FROM table WHERE id < ?', array('10'));
$resp = $pdo->generic('DELETE FROM table WHERE id = ?', array('2'));

Also look ~

File Role Description
class (2 files)
dist (1 directory)
example (1 file)
LICENSE Lic. License text Doc. Documentation

  Files  /  class  
File Role Description
   class.mysqli.instruction.php Class Class source
   class.pdo.instruction.php Class Class source

  Files  /  dist  
File Role Description
php (1 file, 1 directory)

  Files  /  dist  /  php  
File Role Description
connection (2 files)
   autoload.php Aux. Auxiliary script

  Files  /  dist  /  php  /  connection  
File Role Description
   MysqliInstruction.php Class Class source
   PDOInstruction.php Class Class source

  Files  /  example  
File Role Description
   index.php Example Example script

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:6,581
This week:298

For more information send a message to info at phpclasses dot org.