PHP Classes

File: demos/demo3.php

Recommend this page to a friend!
  Classes of Giovanni Ramos   PDO4You   demos/demo3.php   Download  
File: demos/demo3.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PDO4You
Access SQL databases using the PDO extension
Author: By
Last change: Update of demos/demo3.php
Date: 5 months ago
Size: 794 bytes


Class file image Download
// Loading demo class
require 'DemoCRUD.php';

// Example with Multiple Instances
echo '<h2><a href=".">DEMOS</a> &rsaquo; MULTIPLE INSTANCES</h2>';

// Importing classes
use PDO4You\PDO4You;

// Creating an instance
$demo = new DemoCRUD;

// Displaying records of the default instance "standard"

PDO4You::getInstance('bookstore', 'sqlite:data/database_bookstore.db');
PDO4You::getInstance('pdo4you', 'sqlite:data/database_pdo4you.db');

// Displaying records from the data instance: bookstore

// Displaying records from the data instance: pdo4you

// Sets another instance

// Displaying records from the last data instance set