PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of stefano   postgreSQL   ???   Download  
File: ???
Role: Example script
Content type: text/plain
Description: example
Class: postgreSQL
PostgreSQL database access wrapper
Author: By
Last change:
Date: 16 years ago
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();
?>