DB
[ class tree: DB ] [ index: DB ] [ all elements ]

Class: DB_ibase

Source Location: /DB-1.6.8/DB/ibase.php

Class Overview

PEAR
   |
   --DB_common
      |
      --DB_ibase

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


Author(s):

Version:

  • $Id: ibase.php,v 1.69 2004/06/24 15:24:56 danielc Exp $

Variables

Methods


Inherited Variables

Inherited Methods

Class: DB_common

DB_common::DB_common()
Constructor
DB_common::affectedRows()
Returns the affected rows of a query
DB_common::autoCommit()
enable automatic Commit
DB_common::autoExecute()
Automaticaly generate an insert or update query and call prepare() and execute() with it
DB_common::autoPrepare()
Automaticaly generate an insert or update query and pass it to prepare()
DB_common::buildManipSQL()
Make automaticaly an sql query for prepare()
DB_common::commit()
starts a Commit
DB_common::createSequence()
Creates a new sequence
DB_common::dropSequence()
Deletes a sequence
DB_common::errorCode()
Map native error codes to DB's portable ones
DB_common::errorMessage()
Map a DB error code to a textual message. This is actually just a wrapper for DB::errorMessage()
DB_common::errorNative()
Returns an errormessage, provides by the database
DB_common::escapeSimple()
Escape a string according to the current DBMS's standards
DB_common::execute()
Executes a DB statement prepared with prepare()
DB_common::executeMultiple()
This function does several execute() calls on the same statement handle
DB_common::freePrepared()
Free the resource used in a prepared query
DB_common::getAll()
Fetch all the rows returned from a query
DB_common::getAssoc()
Fetch the entire result set of a query and return it as an associative array using the first column as the key
DB_common::getCol()
Fetch a single column from a result set and return it as an indexed array
DB_common::getListOf()
list internal DB info valid values for $type are db dependent, often: databases, users, view, functions
DB_common::getOne()
Fetch the first column of the first row of data returned from a query
DB_common::getOption()
Returns the value of an option
DB_common::getRow()
Fetch the first row of data returned from a query
DB_common::getSpecialQuery()
Returns the query needed to get some backend info
DB_common::getTables()
DB_common::limitQuery()
Generates a limited query
DB_common::nextId()
Returns the next free id in a sequence
DB_common::numRows()
Returns the number of rows in a result object
DB_common::prepare()
Prepares a query for multiple execution with execute()
DB_common::provides()
Tell whether a DB implementation or its backend extension supports a given feature
DB_common::query()
Send a query to the database and return any results with a DB_result object
DB_common::quote()
DEPRECATED: Quotes a string so it can be safely used in a query
DB_common::quoteIdentifier()
Quote a string so it can be safely used as a table or column name
DB_common::quoteSmart()
Format input so it can be safely used in a query
DB_common::quoteString()
DEPRECATED: Quotes a string so it can be safely used within string delimiters in a query
DB_common::raiseError()
Communicate an error and invoke error callbacks, etc
DB_common::rollback()
starts a rollback
DB_common::setFetchMode()
Sets which fetch mode should be used by default on queries on this connection
DB_common::setOption()
Set run-time configuration options for PEAR DB
DB_common::tableInfo()
Returns information about a table or a result set

Class Details

[line 38]
Database independent query interface definition for PHP's Interbase extension.
  • Author: Sterling Hughes <sterling@php.net>
  • Version: $Id: ibase.php,v 1.69 2004/06/24 15:24:56 danielc Exp $


[ Top ]


Class Variables

$autocommit =  1

[line 45]


Type:   mixed


[ Top ]

$connection =

[line 43]


Type:   mixed


[ Top ]

$dbsyntax =

[line 44]


Type:   mixed


[ Top ]

$manip_query = array()

[line 46]


Type:   mixed


[ Top ]

$phptype =

[line 44]


Type:   mixed
Overrides:   Array


[ Top ]



Method Detail

DB_ibase (Constructor)   [line 51]

DB_ibase DB_ibase( )


[ Top ]

autoCommit   [line 436]

void autoCommit( [ $onoff = false])


Overrides DB_common::autoCommit() (enable automatic Commit)

Parameters:

   $onoff   — 

[ Top ]

commit   [line 445]

void commit( )


Overrides DB_common::commit() (starts a Commit)
[ Top ]

connect   [line 95]

void connect( $dsninfo, [ $persistent = false])


Parameters:

   $dsninfo   — 
   $persistent   — 

[ Top ]

createSequence   [line 520]

mixed createSequence( string $seq_name)

Create the sequence
  • Return: DB_OK on success or DB error on error
  • Access: public

Overrides DB_common::createSequence() (Creates a new sequence)

Parameters:

string   $seq_name   —  the name of the sequence

[ Top ]

disconnect   [line 130]

void disconnect( )


[ Top ]

dropSequence   [line 540]

mixed dropSequence( string $seq_name)

Drop a sequence
  • Return: DB_OK on success or DB error on error
  • Access: public

Overrides DB_common::dropSequence() (Deletes a sequence)

Parameters:

string   $seq_name   —  the name of the sequence

[ Top ]

execute   [line 359]

object a &execute( resource $stmt, [mixed $data = array()])

Executes a DB statement prepared with prepare().

Overrides DB_common::execute() (Executes a DB statement prepared with prepare())

Parameters:

resource   $stmt   —  a DB statement resource returned from prepare()
mixed   $data   —  array, string or numeric data to be used in execution of the statement. Quantity of items passed must match quantity of placeholders in query: meaning 1 for non-array items or the quantity of elements in the array.

[ Top ]

freePrepared   [line 421]

bool freePrepared( $stmt $stmt)

Free the internal resources associated with a prepared query.
  • Return: true on success, false if $result is invalid

Overrides DB_common::freePrepared() (Free the resource used in a prepared query)

Parameters:

$stmt   $stmt   —  The interbase_query resource type

[ Top ]

freeQuery   [line 266]

void freeQuery( $query)


Parameters:

   $query   — 

[ Top ]

freeResult   [line 258]

void freeResult( $result)


Parameters:

   $result   — 

[ Top ]

ibaseRaiseError   [line 724]

object DB &ibaseRaiseError( [integer $db_errno = null], [string $native_errmsg = null])

Gather information about an error, then use that info to create a DB error object and finally return that object.

Parameters:

integer   $db_errno   —  PEAR error number (usually a DB constant) if manually raising an error
string   $native_errmsg   —  text of error message if known

[ Top ]

nextId   [line 482]

int nextId( string $seq_name, [boolean $ondemand = true])

Returns the next free id in a sequence
  • Return: the next id number in the sequence. DB_Error if problem.
  • See: DB_common::nextID()
  • Access: public

Overrides DB_common::nextId() (Returns the next free id in a sequence)

Parameters:

string   $seq_name   —  name of the sequence
boolean   $ondemand   —  when true, the seqence is automatically created if it does not exist

[ Top ]

nextResult   [line 196]

true nextResult( a $result)

Move the internal ibase result pointer to the next available result
  • Return: if a result is available otherwise return false
  • Access: public

Parameters:

a   $result   —  valid fbsql result resource

[ Top ]

numCols   [line 275]

void numCols( $result)


Parameters:

   $result   — 

[ Top ]

prepare   [line 309]

mixed prepare( string $query)

Prepares a query for multiple execution with execute().

prepare() requires a generic query as string like

  1.     INSERT INTO numbers VALUES (???)
. The ? characters are placeholders.

Three types of placeholders can be used:

  • ? a quoted scalar value, i.e. strings, integers
  • ! value is inserted 'as is'
  • & requires a file name. The file's contents get inserted into the query (i.e. saving binary data in a db)
Use backslashes to escape placeholder characters if you don't want them to be interpreted as placeholders. Example:
  1.     "UPDATE foo SET col=? WHERE col='over \& under'"

  • Return: DB statement resource on success. DB_Error on failure.

Overrides DB_common::prepare() (Prepares a query for multiple execution with execute())

Parameters:

string   $query   —  query to be prepared

[ Top ]

rollback   [line 453]

void rollback( )


Overrides DB_common::rollback() (starts a rollback)
[ Top ]

simpleQuery   [line 140]

void simpleQuery( $query)


Parameters:

   $query   — 

[ Top ]

tableInfo   [line 634]

array tableInfo( object|string $result, [int $mode = null])

Returns information about a table or a result set.

NOTE: only supports 'table' and 'flags' if $result is a table name.

  • Return: an associative array with the information requested or an error object if something is wrong
  • See: DB_common::tableInfo()
  • Access: public

Overrides DB_common::tableInfo() (Returns information about a table or a result set)

Parameters:

object|string   $result   —  DB_result object from a query or a string containing the name of a table
int   $mode   —  a valid tableInfo mode

[ Top ]

transactionInit   [line 461]

void transactionInit( [ $trans_args = 0])


Parameters:

   $trans_args   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:56:42 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.