Location: PHPKode > scripts > postgreSQL > postgresql/index.php
<?
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();
?>
Return current item: postgreSQL