ClassInterface INFA_OCSP_DBOBJ

Description

interface to handle a database connection object

Located in /db/INFA_OCSP_DBOBJ.phpclass (line 26)


	
			
Method Summary
 bool deleteArray (string $table,  &$valueArr, [boolean $debug = FALSE], array $valueArr)
 array getArray (string $aTable, [array $conditions = NULL], [int $offset = 0], [int $limit = 0], [string $orderBy = ""], [boolean $debug = FALSE])
 string getDBType ()
 int insertArray (string $table, array $valueArr, [boolean $debug = FALSE], [string $idFld = ""])
 string qs_getLikeStmt (string $searchStr, [boolean $toUpper = FALSE], [boolean $inline = TRUE], [boolean $debug = FALSE])
 string qs_getSlashedValue (string $aValue)
 mixed quickQuery (string $aQuery, [int $colNr = -1], [boolean $withErrMsg = False], [boolean $useNames = True], [boolean $secMode = True], [boolean $debug = False])
 bool replaceArray (string $table,  &$valueArr, [boolean $debug = FALSE], array $valueArr)
 bool tblExists (string $aTable, [boolean $debug = False])
 int updateArray (string $aTable, array $conditions, array $values, [int $limit = 0], [boolean $debug = false])
Methods
deleteArray (line 170)

deletes an existing row where the primary key must be set in $valueArr

  • return: TRUE on success FALSE in case of error
  • access: public
bool deleteArray (string $table,  &$valueArr, [boolean $debug = FALSE], array $valueArr)
  • string $table: name of the DBTABLE
  • array $valueArr: value array with FIELDNAME as Index
  • boolean $debug: show debug information
  • &$valueArr
getArray (line 82)

generates a query and returns an array of the resultset

limit <> a multidimensional array is returned (see queryArray) if limit = 1 a single array is returned (see quickQuery)

conditions: if the column starts with a ? the value is assumed to be an sql statement if the column starts with a ~ a like condition is created else column=slashedvalue(value) is added to the query

  • access: public
array getArray (string $aTable, [array $conditions = NULL], [int $offset = 0], [int $limit = 0], [string $orderBy = ""], [boolean $debug = FALSE])
  • string $aTable: (the table name)
  • array $conditions: (array(COLUMN => VALUE)) if VALUE does not starts with a '¿' t
  • int $offset
  • int $limit: (0 is unlimeted)
  • string $orderBy: (comma seperated list of fields to order)
  • boolean $debug
getDBType (line 41)

returns the dbType

  • access: public
string getDBType ()
insertArray (line 125)

inserts a valueArr into the table

inserts a new row out of an array returns the value of the auto_increment field or TRUE in case of an error it returns FALSE

  • return: key of auto-key or TRUE on success FALSE in case of error
  • access: public
int insertArray (string $table, array $valueArr, [boolean $debug = FALSE], [string $idFld = ""])
  • string $table: name of the table to insert
  • array $valueArr: key=>value array
  • boolean $debug: show debug information
  • string $idFld
qs_getLikeStmt (line 199)

returns a sql statement for use in search

  • access: public
string qs_getLikeStmt (string $searchStr, [boolean $toUpper = FALSE], [boolean $inline = TRUE], [boolean $debug = FALSE])
  • string $searchStr
  • boolean $toUpper: convert the searchStr to upper cases or leave it as is
  • boolean $inline: enclose the searchStr in placeholders (%search%)
  • boolean $debug
qs_getSlashedValue (line 186)

returns $aValue with slashes to use to create query strings

  • access: public
string qs_getSlashedValue (string $aValue)
  • string $aValue
quickQuery (line 104)

returns (a column) of the first row match

if $colNr > -1 the column value at position $colNr in the select statement is returned (NOTE: index starts at 0)

if $colNr < 0 a array is returend if $usNames the DB-column names are the index otherwise the index of the returned are is the number in the select order

  • access: public
mixed quickQuery (string $aQuery, [int $colNr = -1], [boolean $withErrMsg = False], [boolean $useNames = True], [boolean $secMode = True], [boolean $debug = False])
  • string $aQuery
  • int $colNr
  • boolean $withErrMsg
  • boolean $useNames
  • boolean $secMode
  • boolean $debug
replaceArray (line 143)

replace existing row or insert now if not exists

inserts a row or update an existing row all existing values not in $valueArr (assoc) will be handeld by db spezifaction see mysql Doc: http://www.mysql.com/doc/en/REPLACE.html

  • return: TRUE on success FALSE in case of error
  • access: public
bool replaceArray (string $table,  &$valueArr, [boolean $debug = FALSE], array $valueArr)
  • string $table: name of the DBTABLE
  • array $valueArr: value array with FIELDNAME as Index
  • boolean $debug: show debug information
  • &$valueArr
tblExists (line 53)

checks if a table exists

  • access: public
bool tblExists (string $aTable, [boolean $debug = False])
  • string $aTable: table name
  • boolean $debug: since pk-03-10-24
updateArray (line 158)

updates $values in $aTable where $conditions

  • return: number of effekted rows
  • version: pk-08-04-07
int updateArray (string $aTable, array $conditions, array $values, [int $limit = 0], [boolean $debug = false])
  • string $aTable
  • array $conditions
  • array $values
  • int $limit
  • boolean $debug

Documentation generated on Thu, 08 Jan 2009 17:44:28 +0100 by phpDocumentor 1.4.0a2