PHP Classes

File: example.php

Recommend this page to a friend!
  Packages of sekouken   Easy Custom Class PDO Access DataBase   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: This is an example to bring up the ease of use this class
Class: Easy Custom Class PDO Access DataBase
PDO database wrapper to access MySQL databases
Author: By
Last change:
Date: 12 years ago
Size: 398 bytes
 

Contents

Class file image Download
<?php 
require "Class.ConBD.php";

$objectConDB = ConDB::getInstance();       //            instance of ConDB 
$stringQuery = "select * from my_table";   //             a sample query
$query=$objectConDB->query($stringQuery);
$query->setFetchMode(PDO::FETCH_OBJ);      //             Format Objet 
$record = $query->fetch();
print_r($record);                                           //retreive the resut of query