PHP Classes

MySQL PDO Connection: Access a MySQL database using PDO

Recommend this page to a friend!
     
  Info   Example   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: 247 All time: 7,964 This week: 61Up
Version License PHP version Categories
mysql-pdo-connection 1.0MIT/X Consortium ...5.4PHP 5, Databases
Description 

Author

This class can access a MySQL database using PDO.

It can connect to a given MySQL database server and perform several operations like executing prepared queries, manage transactions and convert date formats.

Picture of Carlos Alexandre Zancki Encine
  Performance   Level  
Name: Carlos Alexandre Zancki ... <contact>
Classes: 3 packages by
Country: Brazil Brazil

Example

<?php
//Example of use the class conncection
$sql = "SELECT * FROM teste";
$stmt = DB::prepare($sql);
$stmt->execute();
formatJson($stmt->fetchAll());


  Files folder image Files (3)  
File Role Description
Accessible without login Plain text file config.php Aux. config file for class connection
Plain text file connection.class.php Class class singleton to access database
Accessible without login Plain text file exampleConnection.php Example simple example of implemetation of class connection

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  
 0%
Total:247
This week:0
All time:7,964
This week:61Up