PHP Classes

Connection DBMS: Connect to databases using PDO or MySQLi

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 419 All time: 6,404 This week: 96Up
Version License PHP version Categories
connection_dbms 1.1.3MIT/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.

Picture of Leonardo Mauro Pereira Moraes
  Performance   Level  
Name: Leonardo Mauro Pereira ... <contact>
Classes: 3 packages by
Country: Brazil Brazil
Age: 30
All time rank: 2844203 in Brazil Brazil
Week rank: 187 Up15 in Brazil Brazil Up

Recommendations

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

Documentation

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.

Folder:

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

Example

MysqliInstruction()

/Autoload Include/
use \Connection\MysqliInstruction;

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

PDOInstruction()

/Autoload Include/
use \Connection\PDOInstruction;

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

Also look ~


  Files folder image Files (8)  
File Role Description
Files folder imageclass (2 files)
Files folder imagedist (1 directory)
Files folder imageexample (1 file)
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (8)  /  class  
File Role Description
  Plain text file class.mysqli.instruction.php Class Class source
  Plain text file class.pdo.instruction.php Class Class source

  Files folder image Files (8)  /  dist  
File Role Description
Files folder imagephp (1 file, 1 directory)

  Files folder image Files (8)  /  dist  /  php  
File Role Description
Files folder imageconnection (2 files)
  Accessible without login Plain text file autoload.php Aux. Auxiliary script

  Files folder image Files (8)  /  dist  /  php  /  connection  
File Role Description
  Plain text file MysqliInstruction.php Class Class source
  Plain text file PDOInstruction.php Class Class source

  Files folder image Files (8)  /  example  
File Role Description
  Accessible without login Plain text file index.php Example Example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:419
This week:0
All time:6,404
This week:96Up