PHP Classes

File: test

Recommend this page to a friend!
  Classes of alessandro   PDO wrapper singleton   test   Download  
File: test
Role: Example script
Content type: text/plain
Description: test class
Class: PDO wrapper singleton
Database access wrapper using PDO
Author: By
Last change: extend PDO Class , remove singleton
Date: 15 years ago
Size: 863 bytes
 

Contents

Class file image Download
<?php
require_once('myAccessPDO.class.php');

$zzz = new myAccessPDO('192.168.195.253','template1','postgres','postgres','pgsql');

// show tables
echo "<pre>";
print_r($zzz->fetchRow('select * from information_schema.tables where table_schema=\'public\' and table_type=\'BASE TABLE\''));
echo
"</pre>";

echo
"<pre>";
print_r($zzz->prepare('SELECT * from programmattori WHERE nome = ?',array('giggighe')));
echo
"</pre>";




$zzz->simpleQuery("INSERT INTO \"memcache\" (id, nome,numero) VALUES (DEFAULT,'caio',1111) ");

echo
"<br /> ".$zzz->getLog();


echo
"<pre>";
print_r(mydb::getInstance()->fetchRow('SELECT * from programmattori '));
echo
"</pre>";


//echo "<pre>";
//print_r(mydb::getInstance()->getLog());
//echo "</pre>";
//
//
//
//echo "<pre>";
//print_r(mydb::getInstance()->getError());
//echo "</pre>";
//
?>