Class DB_dbase

Description

Database independent query interface definition for PHP's dbase extension.

  • author: Stig Bakken <ssb@php.net>
  • version: $Id: dbase.php,v 1.21 2004/08/03 01:46:17 danielc Exp $

Located in /maintenance/libraries/pear/DB/dbase.php (line 38)

PEAR
   |
   --DB_common
      |
      --DB_dbase
Variable Summary
 mixed $connection
 mixed $dbsyntax
 mixed $phptype
 mixed $result
 mixed $res_row
Method Summary
 DB_dbase DB_dbase ()
 void connect (mixed $dsninfo, [mixed $persistent = false])
 void disconnect ()
 mixed fetchInto (resource $result, array &$arr, int $fetchmode, [int $rownum = null])
 void numCols (mixed $foo)
 void numRows (mixed $foo)
 void &query ([mixed $query = null])
 mixed quoteSmart (mixed $in)
Variables
mixed $connection (line 42)
mixed $dbsyntax (line 43)
mixed $phptype (line 43)

Redefinition of:
DB_common::$phptype
DB type (mysql, oci8, odbc etc.)
mixed $prepare_tokens = array() (line 44)

Redefinition of:
DB_common::$prepare_tokens
mixed $prepare_types = array() (line 45)

Redefinition of:
DB_common::$prepare_types
mixed $result = 0 (line 47)
mixed $res_row = array() (line 46)

Inherited Variables

Inherited from DB_common

DB_common::$dbh
DB_common::$errorcode_map
DB_common::$features
DB_common::$fetchmode
DB_common::$fetchmode_object_class
DB_common::$last_query
DB_common::$options
DB_common::$prepared_queries
DB_common::$prepare_maxstmt
Methods
Constructor DB_dbase (line 57)

DB_mysql constructor.

  • access: public
DB_dbase DB_dbase ()
connect (line 74)
void connect (mixed $dsninfo, [mixed $persistent = false])
disconnect (line 100)
void disconnect ()
fetchInto (line 139)

Fetch a row and insert the data into an existing array.

Formating of the array and the data therein are configurable. See DB_result::fetchInto() for more information.

  • return: DB_OK on success, null when end of result set is reached or on failure
  • access: private
  • see: DB_result::fetchInto()
mixed fetchInto (resource $result, array &$arr, int $fetchmode, [int $rownum = null])
  • resource $result: query result identifier
  • array $arr: (reference) array where data from the row should be placed
  • int $fetchmode: how the resulting array should be indexed
  • int $rownum: the row number to fetch
numCols (line 167)
void numCols (mixed $foo)
numRows (line 175)
void numRows (mixed $foo)

Redefinition of:
DB_common::numRows()
Returns the number of rows in a result object
query (line 110)
void &query ([mixed $query = null])

Redefinition of:
DB_common::query()
Send a query to the database and return any results with a DB_result object
quoteSmart (line 201)

Format input so it can be safely used in a query

  • return: Submitted variable's type = returned value:
    • null = the string NULL
    • boolean = T if true or F if false. Use the Logical data type.
    • integer or double = the unquoted number
    • other (including strings and numeric strings) = the data with single quotes escaped by preceeding single quotes then the whole string is encapsulated between single quotes
  • internal:
mixed quoteSmart (mixed $in)
  • mixed $in: data to be quoted

Redefinition of:
DB_common::quoteSmart()
Format input so it can be safely used in a query

Inherited Methods

Inherited From DB_common

 DB_common::DB_common()
 DB_common::affectedRows()
 DB_common::autoCommit()
 DB_common::autoExecute()
 DB_common::autoPrepare()
 DB_common::buildManipSQL()
 DB_common::commit()
 DB_common::createSequence()
 DB_common::dropSequence()
 DB_common::errorCode()
 DB_common::errorMessage()
 DB_common::errorNative()
 DB_common::escapeSimple()
 DB_common::execute()
 DB_common::executeEmulateQuery()
 DB_common::executeMultiple()
 DB_common::freePrepared()
 DB_common::getAll()
 DB_common::getAssoc()
 DB_common::getCol()
 DB_common::getListOf()
 DB_common::getOne()
 DB_common::getOption()
 DB_common::getRow()
 DB_common::getSequenceName()
 DB_common::getSpecialQuery()
 DB_common::getTables()
 DB_common::limitQuery()
 DB_common::modifyLimitQuery()
 DB_common::modifyQuery()
 DB_common::nextId()
 DB_common::numRows()
 DB_common::prepare()
 DB_common::provides()
 DB_common::query()
 DB_common::quote()
 DB_common::quoteIdentifier()
 DB_common::quoteSmart()
 DB_common::quoteString()
 DB_common::raiseError()
 DB_common::rollback()
 DB_common::setFetchMode()
 DB_common::setOption()
 DB_common::tableInfo()
 DB_common::toString()
 DB_common::_convertNullArrayValuesToEmpty()
 DB_common::_rtrimArrayValues()

Documentation generated on Fri, 10 Dec 2004 18:25:14 +0000 by phpDocumentor 1.3.0RC3