Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of stefano  >  postgreSQL  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: example
Class: postgreSQL
PostgreSQL database access wrapper
Author: By
Last change:
Date: 2009-06-21 14:40
Size: 829 bytes
 

Contents

Class file image Download
<?
require_once "postgreSQL.php";

$args = array ('Hostname'=>'192.168.2.2''Database'=>'stefano''Username'=>'stefano' ,'Password'=>'password');

$args2 = array ('Hostname'=>'192.168.2.2''Port'=>'5432','Database'=>'postgres''Username'=>'stefano' ,'Password'=>'password');
$option = array ('nome'=>'%stefano|sandro''cognome'=>'denardeis','eta'=>'34''citta'=>'PESCARA|NAPOLI%' ,'regione'=>'%abru%|camp%');
$field= array("prova","ciao","vangelis","cesso");

$field2= array();
$sql = new postgreSQL($args);
$sql->connect();
if (
$sql->lock("test","write"))
    echo 
"tabella bloccata";
$sql->Select"test",$field2,$option"nome",'ASC',10,5);
$sql->delete("test",$option);
$sql->insert("test",$option,"nome");
$sql->update("test",$option,$option);

if (
$sql->unlock())
    echo 
"tabella sbloccata";
sleep(10);
$sql->close();
?>