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

Class: DB_dbase

Source Location: /DB-1.6.2/DB/dbase.php

Class Overview

PEAR
   |
   --DB_common
      |
      --DB_dbase

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


Author(s):

Version:

  • $Id: dbase.php,v 1.19 2004/03/05 01:46:53 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 dbase extension.
  • Author: Stig Bakken <ssb@php.net>
  • Version: $Id: dbase.php,v 1.19 2004/03/05 01:46:53 danielc Exp $


[ Top ]


Class Variables

$connection =

[line 42]


Type:   mixed


[ Top ]

$dbsyntax =

[line 43]


Type:   mixed


[ Top ]

$phptype =

[line 43]


Type:   mixed
Overrides:   Array


[ Top ]

$prepare_tokens = array()

[line 44]


Type:   mixed
Overrides:   Array


[ Top ]

$prepare_types = array()

[line 45]


Type:   mixed
Overrides:   Array


[ Top ]

$result =  0

[line 47]


Type:   mixed


[ Top ]

$res_row = array()

[line 46]


Type:   mixed


[ Top ]



Method Detail

DB_dbase (Constructor)   [line 57]

DB_dbase DB_dbase( )

DB_mysql constructor.
  • Access: public

[ Top ]

connect   [line 74]

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


Parameters:

   $dsninfo   — 
   $persistent   — 

[ Top ]

disconnect   [line 95]

void disconnect( )


[ Top ]

numCols   [line 162]

void numCols( $foo)


Parameters:

   $foo   — 

[ Top ]

numRows   [line 170]

void numRows( $foo)


Overrides DB_common::numRows() (Returns the number of rows in a result object)

Parameters:

   $foo   — 

[ Top ]

query   [line 105]

void &query( [ $query = null])


Overrides DB_common::query() (Send a query to the database and return any results with a DB_result object)

Parameters:

   $query   — 

[ Top ]

quoteSmart   [line 196]

mixed quoteSmart( mixed $in)

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

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

Parameters:

mixed   $in   —  data to be quoted

[ Top ]


Documentation generated on Mon, 11 Mar 2019 10:14:51 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.