Main Page   Compound List   File List   Compound Members   File Members  

postgres.php File Reference

Go to the source code of this file.

Functions

 dati_sql ($array,$not_null=0,$is_expression=0,$dati='',$default_not_null=0)
 format sql varibles

 insert_sql ($tbSchema='public',$table_name,$array,$not_null=0,$is_expression=0,$dati='',$default_not_null=0)
 format sql insert query

 update_sql ($tbSchema='public',$table_name,$array,$not_null=0,$is_expression=0,$dati='',$default_not_null=0)
 format sql update query

 where_sql ($array,$operator='=',$logic='AND',$tbSchema='public',$tbName='',$not_null=0,$is_expression=0,$dati='',$default_not_null=0)
 format sql where query

 isopostgis ($coord,$type)
 create postig type from array of coordinates and geometry type

 get_table_attributes ($conn,$table,$field= '',$result_type1=PGSQL_ASSOC,$result_type2=PGSQL_BOTH,$namespace= 'public')
 Retrieve the attribute definition of a table.


Function Documentation

dati_sql   array,
  not_null = 0,
  is_expression = 0,
  dati = '',
  default_not_null = 0
 

format sql varibles

formatta i dati aggiungendo apici se servono o settando a NULL le variabili vuote, o lasciandole vuote se coě specificato dal terzo parametro della funzione

Parameters:
array  sql data
not_null=0  var or array that indicates if all or a variable could be a void string or must be NULL
dati=  '' name of key of $array to parse (default all)
default_not_null=0  if you set $could_be_void as an array, but not for all the values, this set remanent values
is_expression=0  var or array that indicates if all or a variable is a sql expression or a value to be enclose into 2 "
Returns:
parsed array

Definition at line 35 of file postgres.php.

Referenced by insert_sql(), update_sql(), and where_sql().

get_table_attributes   conn,
  table,
  field = '',
  result_type1 = PGSQL_ASSOC,
  result_type2 = PGSQL_BOTH,
  namespace = 'public'
 

Retrieve the attribute definition of a table.

Parameters:
conn  connection resource
table  The name of the table
field  (optional) The name of a field to return
result_type1  one of predef. constant PGSQL_BOTH, PGSQL_ASSOC , PGSQL_NUM for pg_query() function (for first dimension key of array)
result_type2  one of predef. constant PGSQL_BOTH, PGSQL_ASSOC , PGSQL_NUM for pg_query() function (for second dimension key of array)
namespace=  'public' name of postgres schema
Returns:
associative array attributes in order

Definition at line 223 of file postgres.php.

References table.

insert_sql   tbSchema = 'public',
  table_name,
  array,
  not_null = 0,
  is_expression = 0,
  dati = '',
  default_not_null = 0
 

format sql insert query

formatta i dati aggiungendo apici se servono o settando a NULL le variabili vuote, o lasciandole vuote se coě specificato dal terzo parametro della funzione

Parameters:
array  sql data
table_name 
not_null=0  var or array that indicates if all or a variable could be a void string or must be NULL
dati=  '' name of key of $array to insert (default all)
default_not_null=0  if you set $not_null as an array, but not for all the values, this set remanent values
is_expression=0  var or array that indicates if all or a variable is a sql expression or a value to be enclose into 2 "
Returns:
parsed sql query

Definition at line 92 of file postgres.php.

References dati_sql().

Referenced by Pgdb::insert().

isopostgis   coord,
  type
 

create postig type from array of coordinates and geometry type

Parameters:
coord  bidimensional array [east] and [north] or monodimensional if type is point
Returns:
postgis string

Definition at line 198 of file postgres.php.

update_sql   tbSchema = 'public',
  table_name,
  array,
  not_null = 0,
  is_expression = 0,
  dati = '',
  default_not_null = 0
 

format sql update query

formatta i dati aggiungendo apici se servono o settando a NULL le variabili vuote, o lasciandole vuote se coě specificato dal terzo parametro della funzione

Parameters:
array  sql data
table_name 
not_null=0  var or array that indicates if all or a variable could be a void string or must be NULL
dati=  '' name of key of $array to parse (default all)
default_not_null=0  if you set $not_null as an array, but not for all the values, this set remanent values
is_expression=0  var or array that indicates if all or a variable is a sql expression or a value to be enclose into 2 "
Returns:
parsed sql query

Definition at line 128 of file postgres.php.

References dati_sql().

Referenced by Pgdb::update().

where_sql   array,
  operator = '=',
  logic = 'AND',
  tbSchema = 'public',
  tbName = '',
  not_null = 0,
  is_expression = 0,
  dati = '',
  default_not_null = 0
 

format sql where query

formatta i dati aggiungendo apici se servono o settando a NULL le variabili vuote, o lasciandole vuote se coě specificato dal terzo parametro della funzione

Parameters:
array  sql data array
operator=  '=' one operator for all or associative array of operators
logic=  'AND' logic opertor to use
not_null=0  var or array that indicates if all or a variable could be a void string or must be NULL
dati=  '' name of key of $array to parse (default all)
tbName=  '' var or array of table names of all or each field(used in query with more fields of different columns that haves the same name)
default_not_null=0  if you set $not_null as an array, but not for all the values, this set remanent values
is_expression=0  var or array that indicates if all or a variable is a sql expression or a value to be enclose into 2 "
Returns:
parsed sql query

Definition at line 162 of file postgres.php.

References dati_sql().

Referenced by Pgdb::delete(), Pgtable::search(), and Pgdb::update().


Generated on Mon Nov 29 01:21:59 2004 for phpPgWeb by doxygen1.2.18