PHP Classes

File: exampleConnection.php

Recommend this page to a friend!
  Classes of Carlos Alexandre Zancki Encine   MySQL PDO Connection   exampleConnection.php   Download  
File: exampleConnection.php
Role: Example script
Content type: text/plain
Description: simple example of implemetation of class connection
Class: MySQL PDO Connection
Access a MySQL database using PDO
Author: By
Last change:
Date: 9 years ago
Size: 151 bytes
 

Contents

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