Database_Driver_Postgres

Description

Postgres Database Driver NOTE: This driver is not in use and is still being tested thus no documentation was done for it just yet.

  • author: Raymond Benc
  • version: $Id: postgres.class.php 1687 2010-07-22 03:13:27Z Raymond_Benc $
  • copyright: [PHPFOX_COPYRIGHT]

Located in /include/library/phpfox/database/driver/postgres.class.php (line 17)


	
			
Variable Summary
 mixed $_aQuery
 mixed $_hMaster
 mixed $_hSlave
 mixed $_sIsSlave
 mixed $_sLastQuery
Method Summary
 void affectedRows ()
 void connect ( $sHost,  $sUser,  $sPass,  $sName, [ $sPort = false], [ $sPersistent = false])
 void delete (string $sTable, string $sQuery)
 void dropTables ( $aDrops, [ $aVals = array()])
 mixed escape (mixed $mParam)
 void execute ( $sType, [ $aParams = array()])
 void freeResult ()
 void from ( $sTable, [ $sAlias = ''])
 mixed getField (string $sSql)
 int getLastId ()
 void getRow ( $sSql, [ $bAssoc = true])
 void getRows ( $sSql, [ $bAssoc = true])
 void getServerInfo ()
 mixed getSlaveField (string $sSql)
 void getSlaveRow ( $sSql, [ $bAssoc = true])
 void getSlaveRows ( $sSql, [ $bAssoc = true])
 void getVersion ()
 void group ( $sGroup)
 void having ( $sHaving)
 void innerJoin ( $sTable,  $sAlias, [ $mParam = null])
 int insert (string $sTable, array $aValues, [boolean $bEscape = true], [ $bReturnQuery = false])
 void join ( $sTable,  $sAlias, [ $mParam = null])
 void leftJoin ( $sTable,  $sAlias, [ $mParam = null])
 void limit ( $iPage, [ $sLimit = null], [ $iCnt = null])
 void multiInsert ( $sTable,  $aFields,  $aValues)
 void order ( $sOrder)
 int query (string $sSql, [ &$hLink = ''])
 void search ( $sType,  $mFields,  $sSearch)
 void select ( $sSelect)
 void sqlReport ( $sQuery)
 boolean update (string $sTable, array $aValues, string $sCond, [boolean $bEscape = true])
 void where ( $aConds)
 mixed _getField (string $sSql,  &$hLink)
 array _getRow (string $sSql, string $bAssoc,  &$hLink)
 array _getRows (string $sSql, [string $bAssoc = true],  &$hLink)
 void _join ( $sType,  $sTable,  $sAlias, [ $mParam = null])
 void _sqlError ()
Variables
mixed $sSlaveServer = '' (line 19)
  • access: public
mixed $_aQuery = array() (line 25)
  • access: private
mixed $_hMaster = null (line 21)
  • access: private
mixed $_hSlave = null (line 22)
  • access: private
mixed $_sIsSlave = '' (line 23)
  • access: private
mixed $_sLastQuery (line 24)
  • access: private
Methods
affectedRows (line 392)
  • access: public
void affectedRows ()
connect (line 27)
  • access: public
void connect ( $sHost,  $sUser,  $sPass,  $sName, [ $sPort = false], [ $sPersistent = false])
  • $sHost
  • $sUser
  • $sPass
  • $sName
  • $sPort
  • $sPersistent
delete (line 313)

Delete entry from the database

  • access: public
void delete (string $sTable, string $sQuery)
  • string $sTable: is the table name
  • string $sQuery: is the query we will run
dropTables (line 626)
  • access: public
void dropTables ( $aDrops, [ $aVals = array()])
  • $aDrops
  • $aVals
escape (line 182)

Prepares string to store in db (performs addslashes() )

  • return: escaped string or array of escaped strings
  • access: public
mixed escape (mixed $mParam)
  • mixed $mParam: string or array of string need to be escaped
execute (line 523)
  • access: public
void execute ( $sType, [ $aParams = array()])
  • $sType
  • $aParams
freeResult (line 384)
  • access: public
void freeResult ()
from (line 456)
  • access: public
void from ( $sTable, [ $sAlias = ''])
  • $sTable
  • $sAlias
getField (line 170)

Returns one field from a row

  • return: field value
  • access: public
mixed getField (string $sSql)
  • string $sSql: SQL query
getLastId (line 324)

Returns row id from last executed query

  • return: id of last INSERT operation
  • access: public
int getLastId ()
getRow (line 154)
  • access: public
void getRow ( $sSql, [ $bAssoc = true])
  • $sSql
  • $bAssoc
getRows (line 159)
  • access: public
void getRows ( $sSql, [ $bAssoc = true])
  • $sSql
  • $bAssoc
getServerInfo (line 91)
  • access: public
void getServerInfo ()
getSlaveField (line 133)

Returns one field from a row

  • return: field value
  • access: public
mixed getSlaveField (string $sSql)
  • string $sSql: SQL query
getSlaveRow (line 140)
  • access: public
void getSlaveRow ( $sSql, [ $bAssoc = true])
  • $sSql
  • $bAssoc
getSlaveRows (line 147)
  • access: public
void getSlaveRows ( $sSql, [ $bAssoc = true])
  • $sSql
  • $bAssoc
getVersion (line 86)
  • access: public
void getVersion ()
group (line 473)
  • access: public
void group ( $sGroup)
  • $sGroup
having (line 480)
  • access: public
void having ( $sHaving)
  • $sHaving
innerJoin (line 494)
  • access: public
void innerJoin ( $sTable,  $sAlias, [ $mParam = null])
  • $sTable
  • $sAlias
  • $mParam
insert (line 241)

Performs insert of one row. Accepts values to insert as an array: 'column1' => 'value1' 'column2' => 'value2'

  • return: last ID (or 0 on error)
  • access: public
int insert (string $sTable, array $aValues, [boolean $bEscape = true], [ $bReturnQuery = false])
  • string $sTable: table name
  • array $aValues: column and values to insert
  • boolean $bEscape: true - method escapes values (with "), false - not escapes
  • $bReturnQuery
join (line 501)
  • access: public
void join ( $sTable,  $sAlias, [ $mParam = null])
  • $sTable
  • $sAlias
  • $mParam
leftJoin (line 487)
  • access: public
void leftJoin ( $sTable,  $sAlias, [ $mParam = null])
  • $sTable
  • $sAlias
  • $mParam
limit (line 508)
  • access: public
void limit ( $iPage, [ $sLimit = null], [ $iCnt = null])
  • $iPage
  • $sLimit
  • $iCnt
multiInsert (line 199)
  • access: public
void multiInsert ( $sTable,  $aFields,  $aValues)
  • $sTable
  • $aFields
  • $aValues
order (line 463)
  • access: public
void order ( $sOrder)
  • $sOrder
query (line 103)

Performs sql query with error reporting and logging.

  • return: query result handle
  • access: public
int query (string $sSql, [ &$hLink = ''])
  • string $sSql: query string
  • &$hLink
search (line 397)
  • access: public
void search ( $sType,  $mFields,  $sSearch)
  • $sType
  • $mFields
  • $sSearch
select (line 422)
  • access: public
void select ( $sSelect)
  • $sSelect
sqlReport (line 589)
void sqlReport ( $sQuery)
  • $sQuery
update (line 281)

Performs update of rows.

  • return: true - update successfule, false - error
  • access: public
boolean update (string $sTable, array $aValues, string $sCond, [boolean $bEscape = true])
  • string $sTable: table name
  • array $aValues: array of column=>new_value
  • string $sCond: condition (without WHERE)
  • boolean $bEscape: true - method escapes values (with "), false - not escapes
where (line 434)
  • access: public
void where ( $aConds)
  • $aConds
_getField (line 733)

Returns one field from a row

  • return: field value
  • access: private
mixed _getField (string $sSql,  &$hLink)
  • string $sSql: SQL query
  • &$hLink
_getRow (line 690)

Returns exactly one row as array. If there is number of rows satisfying the condition then the first one will be returned.

  • return: exact one row (first if multiply row selected): or false on error
  • access: private
array _getRow (string $sSql, string $bAssoc,  &$hLink)
  • string $sSql: select query
  • string $bAssoc: type of returned rows array
  • &$hLink
_getRows (line 709)

Gets data returned by sql query

  • return: selected rows (each row is array of specified type) or emprt array on error
  • access: private
array _getRows (string $sSql, [string $bAssoc = true],  &$hLink)
  • string $sSql: select query
  • string $bAssoc: type of returned rows array
  • &$hLink
_join (line 654)
  • access: private
void _join ( $sType,  $sTable,  $sAlias, [ $mParam = null])
  • $sType
  • $sTable
  • $sAlias
  • $mParam
_sqlError (line 676)
  • access: private
void _sqlError ()

Documentation generated on Tue, 28 Sep 2010 10:36:43 +0200 by phpDocumentor 1.4.0a2