Class: MDB_Common
Source Location: /MDB-1.3.0/MDB/Common.php
PEAR
|
--MDB_Common
MDB_Common: Base class that is extended by each MDB driver
Author(s):
|
|
Child classes:
|
Inherited Variables
|
Inherited Methods
|
Class Details
Method Detail
MDB_Common (Constructor) [line 296]
affectedRows [line 2505]
returns the affected rows of a query
Overridden in child classes as:
- MDB_ibase::affectedRows()
- returns the affected rows of a query
alterTable [line 1141]
mixed alterTable(
string
$name, array
$changes, boolean
$check)
|
|
alter an existing table
Parameters:
autoCommit [line 791]
mixed autoCommit(
boolean
$auto_commit)
|
|
Define whether database changes done on the database be automatically committed. This function may also implicitly start or end a transaction.
Overridden in child classes as:
- MDB_xxx::autoCommit()
- Define whether database changes done on the database be automatically committed. This function may also implicitly start or end a transaction.
- MDB_ibase::autoCommit()
- Define whether database changes done on the database be automatically committed. This function may also implicitly start or end a transaction.
- MDB_mysql::autoCommit()
- Define whether database changes done on the database be automatically committed. This function may also implicitly start or end a transaction.
- MDB_fbsql::autoCommit()
- Define whether database changes done on the database be automatically committed. This function may also implicitly start or end a transaction.
- MDB_oci8::autoCommit()
- Define whether database changes done on the database be automatically committed. This function may also implicitly start or end a transaction.
- MDB_pgsql::autoCommit()
- Define whether database changes done on the database be automatically committed. This function may also implicitly start or end a transaction.
- MDB_mssql::autoCommit()
- Define whether database changes done on the database be automatically committed. This function may also implicitly start or end a transaction.
Parameters:
captureDebugOutput [line 510]
void captureDebugOutput(
string
$capture)
|
|
set a debug handler
Parameters:
commit [line 810]
Commit the database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after committing the pending changes.
Overridden in child classes as:
- MDB_xxx::commit()
- Commit the database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after committing the pending changes.
- MDB_ibase::commit()
- Commit the database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after committing the pending changes.
- MDB_mysql::commit()
- Commit the database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after committing the pending changes.
- MDB_fbsql::commit()
- Commit the database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after committing the pending changes.
- MDB_oci8::commit()
- Commit the database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after committing the pending changes.
- MDB_pgsql::commit()
- Commit the database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after committing the pending changes.
- MDB_mssql::commit()
- Commit the database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after committing the pending changes.
convertResult [line 2846]
convertResultRow [line 2862]
mixed convertResultRow(
resource
$result, array
$row)
|
|
convert a result row
Parameters:
createDatabase [line 957]
mixed createDatabase(
string
$name)
|
|
create a new database
Parameters:
createIndex [line 1399]
mixed createIndex(
string
$table, string
$name, array
$definition)
|
|
get the stucture of a field into an array
Parameters:
createLob [line 4432]
integer createLob(
array
$arguments)
|
|
Create a handler object of a specified class with functions to retrieve data from a large object data stream.
Parameters:
createSequence [line 1478]
mixed createSequence(
string
$name, [string
$start = 1])
|
|
create sequence
Parameters:
createTable [line 1018]
mixed createTable(
string
$name, array
$fields)
|
|
create a new table
Parameters:
currId [line 3612]
debug [line 525]
void debug(
string
$message)
|
|
set a debug message
Parameters:
debugOutput [line 545]
destroyLob [line 4527]
void destroyLob(
integer
$lob)
|
|
Free any resources allocated during the lifetime of the large object handler object.
Parameters:
disconnect [line 846]
Log out and disconnect from the database.
dropDatabase [line 976]
mixed dropDatabase(
string
$name)
|
|
drop an existing database
Parameters:
dropIndex [line 1419]
mixed dropIndex(
string
$table, string
$name)
|
|
drop existing index
Parameters:
dropSequence [line 1497]
mixed dropSequence(
string
$name)
|
|
drop existing sequence
Parameters:
dropTable [line 1037]
mixed dropTable(
string
$name)
|
|
drop an existing table
Parameters:
endOfLob [line 4511]
boolean endOfLob(
integer
$lob)
|
|
Determine whether it was reached the end of the large object and therefore there is no more data to be read for the its input stream.
Parameters:
endOfResult [line 2562]
endOfResultLob [line 2679]
mixed endOfResultLob(
int
$lob)
|
|
Determine whether it was reached the end of the large object and therefore there is no more data to be read for the its input stream.
Overridden in child classes as:
- MDB_xxx::endOfResultLob()
- Determine whether it was reached the end of the large object and therefore there is no more data to be read for the its input stream.
- MDB_ibase::endOfResultLob()
- Determine whether it was reached the end of the large object and therefore there is no more data to be read for the its input stream.
- MDB_pgsql::endOfResultLob()
- Determine whether it was reached the end of the large object and therefore there is no more data to be read for the its input stream.
Parameters:
error [line 622]
Retrieve the error message text associated with the last operation that failed. Some functions may fail but they do not return the reason that makes them to fail. This function is meant to retrieve a textual description of the failure cause.
errorCode [line 341]
int errorCode(
mixed
$nativecode)
|
|
Map native error codes to MDB's portable ones. Requires that the DB implementation's constructor fills in the $errorcode_map property.
Overridden in child classes as:
- MDB_ibase::errorCode()
- Map native error codes to DB's portable ones. Requires that the DB implementation's constructor fills in the $errorcode_map property.
- MDB_pgsql::errorCode()
- Map native error codes to DB's portable ones. Requires that the DB implementation's constructor fills in the $errorcode_map property.
Parameters:
errorMessage [line 362]
string errorMessage(
integer
$dbcode)
|
|
Map a MDB error code to a textual message. This is actually just a wrapper for MDB::errorMessage().
Parameters:
errorNative [line 427]
returns an errormessage, provides by the database
Overridden in child classes as:
- MDB_xxx::errorNative()
- Get the native error code of the last error (if any) that occured on the current connection.
- MDB_ibase::errorNative()
- Get the native error code of the last error (if any) that occured on the current connection.
- MDB_mysql::errorNative()
- Get the native error code of the last error (if any) that occured on the current connection.
- MDB_fbsql::errorNative()
- Get the native error code of the last error (if any) that occured on the current connection.
- MDB_oci8::errorNative()
- Get the native error code of the last error (if any) that occured on the current connection.
- MDB_pgsql::errorNative()
- Get the native error code of the last error (if any) that occured on the current connection.
- MDB_mssql::errorNative()
- Get the native error code of the last error (if any) that occured on the current connection.
execute [line 2035]
mixed execute(
resource
$prepared_query, [array
$types = NULL], [array
$params = FALSE], [array
$param_types = NULL])
|
|
Executes a prepared SQL query With execute() the generic query of prepare is assigned with the given data array. The values of the array inserted into the query in the same order like the array order
Parameters:
executeMultiple [line 2064]
mixed executeMultiple(
$prepared_query, [array
$types = NULL], array
$params, [
$param_types = NULL], resource
$stmt, array
$parAM_types)
|
|
This function does several execute() calls on the same statement handle. $params must be an array indexed numerically from 0, one execute call is done for every 'row' in the array. If an error occurs during execute(), executeMultiple() does not execute the unfinished rows, but rather returns that error.
Parameters:
executeQuery [line 1941]
mixed executeQuery(
int
$prepared_query, [array
$types = NULL])
|
|
Execute a prepared query statement.
Parameters:
fetch [line 2606]
fetchAll [line 3796]
mixed fetchAll(
resource
$result, [int
$fetchmode = MDB_FETCHMODE_DEFAULT], [boolean
$rekey = FALSE], [boolean
$force_array = FALSE], [boolean
$group = FALSE])
|
|
Fetch and return a column of data (it uses fetchInto for that)
Parameters:
fetchBlob [line 2762]
fetchBoolean [line 2961]
mixed fetchBoolean(
resource
$result, int
$row, int
$field)
|
|
fetch a boolean value from a result set
Parameters:
fetchClob [line 2744]
fetchCol [line 3753]
mixed fetchCol(
resource
$result, [int
$colnum = 0])
|
|
Fetch and return a column of data (it uses fetchInto for that)
Parameters:
fetchDate [line 2907]
mixed fetchDate(
resource
$result, int
$row, int
$field)
|
|
fetch a date value from a result set
Parameters:
fetchDecimal [line 2997]
mixed fetchDecimal(
resource
$result, int
$row, int
$field)
|
|
fetch a decimal value from a result set
Parameters:
fetchFloat [line 2979]
mixed fetchFloat(
resource
$result, int
$row, int
$field)
|
|
fetch a float value from a result set
Parameters:
fetchInto [line 3641]
fetchLob [line 2624]
mixed fetchLob(
resource
$result, int
$row, int
$field)
|
|
fetch a lob value from a result set
Parameters:
fetchOne [line 3709]
mixed fetchOne(
resource
$result)
|
|
Fetch and return a field of data (it uses fetchInto for that)
Parameters:
fetchRow [line 3733]
mixed fetchRow(
resource
$result, [int
$fetchmode = MDB_FETCHMODE_DEFAULT], [int
$rownum = NULL])
|
|
Fetch and return a row of data (it uses fetchInto for that)
Parameters:
fetchTime [line 2943]
mixed fetchTime(
resource
$result, int
$row, int
$field)
|
|
fetch a time value from a result set
Parameters:
fetchTimestamp [line 2925]
mixed fetchTimestamp(
resource
$result, int
$row, int
$field)
|
|
fetch a timestamp value from a result set
Parameters:
freeBlobValue [line 3420]
freeClobValue [line 3385]
freePreparedQuery [line 1899]
mixed freePreparedQuery(
int
$prepared_query)
|
|
Release resources allocated for the specified prepared query.
Parameters:
freeResult [line 3028]
getAll [line 4241]
array getAll(
string
$query, [array
$types = NULL], [array
$params = array()], [array
$param_types = NULL], [integer
$fetchmode = MDB_FETCHMODE_DEFAULT])
|
|
Fetch all the rows returned from a query.
Parameters:
getAssoc [line 4191]
array getAssoc(
string
$query, [array
$types = NULL], [array
$params = array()], [array
$param_types = NULL], [
$fetchmode = MDB_FETCHMODE_ORDERED], [boolean
$force_array = FALSE], [boolean
$group = FALSE])
|
|
Fetch the entire result set of a query and return it as an associative array using the first column as the key. If the result set contains more than two columns, the value will be an array of the values from column 2-n. If the result set contains only two columns, the returned value will be a scalar with the value of the second column (unless forced to an array with the $force_array parameter). A MDB error code is returned on errors. If the result set contains fewer than two columns, a MDB_ERROR_TRUNCATED error is returned. For example, if the table 'mytable' contains: ID TEXT DATE -------------------------------- - 'one' 944679408
- 'two' 944679408
- 'three' 944679408
Then the call getAssoc('SELECT id,text FROM mytable') returns: array( '1' => 'one', '2' => 'two', '3' => 'three', ) ...while the call getAssoc('SELECT id,text,date FROM mytable') returns: array( '1' => array('one', '944679408'), '2' => array('two', '944679408'), '3' => array('three', '944679408') ) If the more than one row occurs with the same value in the first column, the last row overwrites all previous ones by default. Use the $group parameter if you don't want to overwrite like this. Example: getAssoc('SELECT category,id,name FROM mytable', NULL, NULL MDB_FETCHMODE_ASSOC, FALSE, TRUE) returns: array( '1' => array(array('id' => '4', 'name' => 'number four'), array('id' => '6', 'name' => 'number six') ), '9' => array(array('id' => '4', 'name' => 'number four'), array('id' => '6', 'name' => 'number six') ) ) Keep in mind that database functions in PHP usually return string values for results regardless of the database's internal type.
Parameters:
getBlobDeclaration [line 3153]
string getBlobDeclaration(
string
$name, string
$field)
|
|
Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE.
Overridden in child classes as:
- MDB_ibase::getBlobDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE.
- MDB_mysql::getBlobDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE.
- MDB_fbsql::getBlobDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE.
- MDB_oci8::getBlobDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE.
- MDB_pgsql::getBlobDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE.
- MDB_mssql::getBlobDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE.
Parameters:
getBlobValue [line 3403]
string getBlobValue(
resource
$prepared_query, $parameter
$parameter, $blob
$blob)
|
|
Convert a text value into a DBMS specific format that is suitable to compose query statements.
Overridden in child classes as:
- MDB_xxx::getBlobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_ibase::getBlobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_mysql::getBlobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_fbsql::getBlobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_oci8::getBlobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_pgsql::getBlobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_mssql::getBlobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
Parameters:
getBooleanDeclaration [line 3180]
string getBooleanDeclaration(
string
$name, string
$field)
|
|
Obtain DBMS specific SQL code portion needed to declare a boolean type field to be used in statements like CREATE TABLE.
Overridden in child classes as:
- MDB_fbsql::getBooleanDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a boolean type field to be used in statements like CREATE TABLE.
- MDB_oci8::getBooleanDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a boolean type field to be used in statements like CREATE TABLE.
- MDB_mssql::getBooleanDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a boolean type field to be used in statements like CREATE TABLE.
Parameters:
getBooleanValue [line 3436]
string getBooleanValue(
string
$value)
|
|
Convert a text value into a DBMS specific format that is suitable to compose query statements.
Overridden in child classes as:
- MDB_fbsql::getBooleanValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_mssql::getBooleanValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
Parameters:
getClobDeclaration [line 3124]
string getClobDeclaration(
string
$name, string
$field)
|
|
Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE.
Overridden in child classes as:
- MDB_ibase::getClobDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE.
- MDB_mysql::getClobDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE.
- MDB_fbsql::getClobDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE.
- MDB_oci8::getClobDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE.
- MDB_pgsql::getClobDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE.
- MDB_mssql::getClobDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE.
Parameters:
getClobValue [line 3368]
string getClobValue(
resource
$prepared_query, $parameter
$parameter, $clob
$clob)
|
|
Convert a text value into a DBMS specific format that is suitable to compose query statements.
Overridden in child classes as:
- MDB_xxx::getClobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_ibase::getClobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_mysql::getClobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_fbsql::getClobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_oci8::getClobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_pgsql::getClobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_mssql::getClobValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
Parameters:
getCol [line 4083]
array getCol(
string
$query, [string
$type = NULL], [array
$params = array()], [array
$param_types = NULL], [mixed
$colnum = 0])
|
|
Fetch a single column from a result set and return it as an indexed array.
Parameters:
getColumnNames [line 2529]
getDateDeclaration [line 3207]
string getDateDeclaration(
string
$name, string
$field)
|
|
Obtain DBMS specific SQL code portion needed to declare a date type field to be used in statements like CREATE TABLE.
Overridden in child classes as:
- MDB_ibase::getDateDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a date type field to be used in statements like CREATE TABLE.
- MDB_mysql::getDateDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an date type field to be used in statements like CREATE TABLE.
- MDB_fbsql::getDateDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an date type field to be used in statements like CREATE TABLE.
- MDB_oci8::getDateDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a date type field to be used in statements like CREATE TABLE.
- MDB_pgsql::getDateDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a date type field to be used in statements like CREATE TABLE.
- MDB_mssql::getDateDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an date type field to be used in statements like CREATE TABLE.
Parameters:
getDateValue [line 3453]
string getDateValue(
string
$value)
|
|
Convert a text value into a DBMS specific format that is suitable to compose query statements.
Overridden in child classes as:
- MDB_fbsql::getDateValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_oci8::getDateValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
Parameters:
getDecimalDeclaration [line 3315]
string getDecimalDeclaration(
string
$name, string
$field)
|
|
Obtain DBMS specific SQL code portion needed to declare a decimal type field to be used in statements like CREATE TABLE.
Overridden in child classes as:
- MDB_ibase::getDecimalDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a decimal type field to be used in statements like CREATE TABLE.
- MDB_mysql::getDecimalDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an decimal type field to be used in statements like CREATE TABLE.
- MDB_fbsql::getDecimalDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an decimal type field to be used in statements like CREATE TABLE.
- MDB_oci8::getDecimalDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a decimal type field to be used in statements like CREATE TABLE.
- MDB_pgsql::getDecimalDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a decimal type field to be used in statements like CREATE TABLE.
- MDB_mssql::getDecimalDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an decimal type field to be used in statements like CREATE TABLE.
Parameters:
getDecimalValue [line 3521]
string getDecimalValue(
string
$value)
|
|
Convert a text value into a DBMS specific format that is suitable to compose query statements.
Overridden in child classes as:
- MDB_ibase::getDecimalValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_mysql::getDecimalValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_fbsql::getDecimalValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_oci8::getDecimalValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_pgsql::getDecimalValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_mssql::getDecimalValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
Parameters:
getDSN [line 925]
mixed getDSN(
[string
$type = 'string'])
|
|
return the DSN as a string
Parameters:
getFieldDeclaration [line 1299]
mixed getFieldDeclaration(
string
$field_name, string
$field)
|
|
get declaration of a field
Parameters:
getFieldDeclarationList [line 1336]
mixed getFieldDeclarationList(
string
$fields)
|
|
get declaration of a number of field in bulk
Parameters:
getFloatDeclaration [line 3288]
string getFloatDeclaration(
string
$name, string
$field)
|
|
Obtain DBMS specific SQL code portion needed to declare a float type field to be used in statements like CREATE TABLE.
Overridden in child classes as:
- MDB_ibase::getFloatDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a float type field to be used in statements like CREATE TABLE.
- MDB_mysql::getFloatDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an float type field to be used in statements like CREATE TABLE.
- MDB_fbsql::getFloatDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an float type field to be used in statements like CREATE TABLE.
- MDB_oci8::getFloatDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a float type field to be used in statements like CREATE TABLE.
- MDB_pgsql::getFloatDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a float type field to be used in statements like CREATE TABLE.
- MDB_mssql::getFloatDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an float type field to be used in statements like CREATE TABLE.
Parameters:
getFloatValue [line 3504]
string getFloatValue(
string
$value)
|
|
Convert a text value into a DBMS specific format that is suitable to compose query statements.
Overridden in child classes as:
- MDB_ibase::getFloatValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_mysql::getFloatValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_fbsql::getFloatValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_oci8::getFloatValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_pgsql::getFloatValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_mssql::getFloatValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
Parameters:
getIntegerDeclaration [line 3059]
string getIntegerDeclaration(
string
$name, string
$field)
|
|
Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE.
Overridden in child classes as:
- MDB_mysql::getIntegerDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE.
- MDB_fbsql::getIntegerDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE.
- MDB_oci8::getIntegerDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE.
- MDB_mssql::getIntegerDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE.
Parameters:
getIntegerValue [line 3332]
string getIntegerValue(
string
$value)
|
|
Convert a text value into a DBMS specific format that is suitable to compose query statements.
Parameters:
getOne [line 3977]
mixed getOne(
string
$query, [string
$type = NULL], [array
$params = array()], [array
$param_types = NULL])
|
|
Fetch the first column of the first row of data returned from a query. Takes care of doing the query and freeing the results when finished.
Parameters:
getOption [line 491]
mixed getOption(
string
$option)
|
|
returns the value of an option
Parameters:
getRow [line 4031]
array getRow(
string
$query, [array
$types = NULL], [array
$params = array()], [array
$param_types = NULL], [integer
$fetchmode = MDB_FETCHMODE_DEFAULT])
|
|
Fetch the first row of data returned from a query. Takes care of doing the query and freeing the results when finished.
Parameters:
getSequenceDefinition [line 1534]
mixed getSequenceDefinition(
string
$sequence)
|
|
get the stucture of a sequence into an array
Parameters:
getSequenceName [line 3577]
string getSequenceName(
string
$sqn)
|
|
adds sequence name formating to a sequence name
Parameters:
getTableFieldDefinition [line 1270]
mixed getTableFieldDefinition(
string
$table,
$field, string
$fields)
|
|
get the stucture of a field into an array
Parameters:
getTableIndexDefinition [line 1458]
mixed getTableIndexDefinition(
string
$table, string
$index)
|
|
get the stucture of an index into an array
Parameters:
getTextDeclaration [line 3095]
string getTextDeclaration(
string
$name, string
$field)
|
|
Obtain DBMS specific SQL code portion needed to declare an text type field to be used in statements like CREATE TABLE.
Overridden in child classes as:
- MDB_ibase::getTextDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an text type field to be used in statements like CREATE TABLE.
- MDB_fbsql::getTextDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an text type field to be used in statements like CREATE TABLE.
- MDB_oci8::getTextDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an text type field to be used in statements like CREATE TABLE.
- MDB_pgsql::getTextDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an text type field to be used in statements like CREATE TABLE.
- MDB_mssql::getTextDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an text type field to be used in statements like CREATE TABLE.
Parameters:
getTextValue [line 3349]
string getTextValue(
string
$value)
|
|
Convert a text value into a DBMS specific format that is suitable to compose query statements.
Parameters:
getTimeDeclaration [line 3261]
string getTimeDeclaration(
string
$name, string
$field)
|
|
Obtain DBMS specific SQL code portion needed to declare a time field to be used in statements like CREATE TABLE.
Overridden in child classes as:
- MDB_ibase::getTimeDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a time field to be used in statements like CREATE TABLE.
- MDB_mysql::getTimeDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an time type field to be used in statements like CREATE TABLE.
- MDB_fbsql::getTimeDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an time type field to be used in statements like CREATE TABLE.
- MDB_oci8::getTimeDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a time field to be used in statements like CREATE TABLE.
- MDB_pgsql::getTimeDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a time field to be used in statements like CREATE TABLE.
- MDB_mssql::getTimeDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an time type field to be used in statements like CREATE TABLE.
Parameters:
getTimestampDeclaration [line 3234]
string getTimestampDeclaration(
string
$name, string
$field)
|
|
Obtain DBMS specific SQL code portion needed to declare a timestamp field to be used in statements like CREATE TABLE.
Overridden in child classes as:
- MDB_mysql::getTimestampDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an timestamp type field to be used in statements like CREATE TABLE.
- MDB_fbsql::getTimestampDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an timestamp type field to be used in statements like CREATE TABLE.
- MDB_oci8::getTimestampDeclaration()
- Obtain DBMS specific SQL code portion needed to declare a timestamp field to be used in statements like CREATE TABLE.
- MDB_mssql::getTimestampDeclaration()
- Obtain DBMS specific SQL code portion needed to declare an timestamp type field to be used in statements like CREATE TABLE.
Parameters:
getTimestampValue [line 3470]
string getTimestampValue(
string
$value)
|
|
Convert a text value into a DBMS specific format that is suitable to compose query statements.
Overridden in child classes as:
- MDB_fbsql::getTimestampValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_oci8::getTimestampValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
Parameters:
getTimeValue [line 3487]
string getTimeValue(
string
$value)
|
|
Convert a text value into a DBMS specific format that is suitable to compose query statements.
Overridden in child classes as:
- MDB_fbsql::getTimeValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
- MDB_oci8::getTimeValue()
- Convert a text value into a DBMS specific format that is suitable to compose query statements.
Parameters:
getValue [line 3539]
string getValue(
string
$type, string
$value)
|
|
Convert a text value into a DBMS specific format that is suitable to compose query statements.
Parameters:
getWarnings [line 456]
get all warnings in reverse order. This means that the last warning is the first element in the array
limitQuery [line 1607]
mixed limitQuery(
string
$query, [mixed
$types = NULL], integer
$from, integer
$count)
|
|
Generates a limited query
Parameters:
listDatabases [line 1159]
listFunctions [line 1213]
list all functions in the current database
listSequences [line 1515]
list all tables in the current database
listTableFields [line 1250]
mixed listTableFields(
string
$table)
|
|
list all fields in a tables in the current database
Parameters:
listTableIndexes [line 1438]
mixed listTableIndexes(
string
$table)
|
|
list all indexes in a table
Parameters:
listTables [line 1231]
list all tables in the current database
listUsers [line 1177]
listViews [line 1195]
list all viewes in the current database
loadLob [line 733]
void loadLob(
[string
$scope = ''])
|
|
loads the LOB module
Parameters:
loadManager [line 756]
void loadManager(
[string
$scope = ''])
|
|
loads the Manager module
Parameters:
nextId [line 3596]
numCols [line 2546]
mixed numCols(
resource
$result)
|
|
Count the number of columns returned by the DBMS in a query result.
Overridden in child classes as:
- MDB_xxx::numCols()
- Count the number of columns returned by the DBMS in a query result.
- MDB_ibase::numCols()
- Count the number of columns returned by the DBMS in a query result.
- MDB_mysql::numCols()
- Count the number of columns returned by the DBMS in a query result.
- MDB_querysim::numCols()
- Count the number of columns returned by the DBMS in a query result.
- MDB_fbsql::numCols()
- Count the number of columns returned by the DBMS in a query result.
- MDB_oci8::numCols()
- Count the number of columns returned by the DBMS in a query result.
- MDB_pgsql::numCols()
- Count the number of columns returned by the DBMS in a query result.
- MDB_mssql::numCols()
- Count the number of columns returned by the DBMS in a query result.
Parameters:
numRows [line 3013]
prepareQuery [line 1815]
mixed prepareQuery(
$query, string
$)
|
|
Prepares a query for multiple execution with execute(). With some database backends, this is emulated. prepareQuery() requires a generic query as string like 'INSERT INTO numbers VALUES(?,?,?)'. The ? are wildcards. Types of wildcards: ? - a quoted scalar value, i.e. strings, integers
Parameters:
query [line 1555]
mixed query(
string
$query, [mixed
$types = NULL])
|
|
Send a query to the database and return any results
Overridden in child classes as:
- MDB_xxx::query()
- Send a query to the database and return any results
- MDB_ibase::query()
- Send a query to the database and return any results
- MDB_mysql::query()
- Send a query to the database and return any results
- MDB_querysim::query()
- Get QuerySim text from appropriate source and return the parsed text.
- MDB_fbsql::query()
- Send a query to the database and return any results
- MDB_oci8::query()
- Send a query to the database and return any results
- MDB_pgsql::query()
- Send a query to the database and return any results
- MDB_mssql::query()
- Send a query to the database and return any results
Parameters:
queryAll [line 3950]
mixed queryAll(
string
$query, [array
$types = NULL], [int
$fetchmode = MDB_FETCHMODE_DEFAULT], [boolean
$rekey = FALSE], [boolean
$force_array = FALSE], [boolean
$group = FALSE])
|
|
Execute the specified query, fetch all the rows of the result set into a two dimensional array and then frees the result set.
Parameters:
queryCol [line 3913]
mixed queryCol(
string
$query, [string
$type = NULL], [int
$colnum = 0])
|
|
Execute the specified query, fetch the value from the first column of each row of the result set into an array and then frees the result set.
Parameters:
queryOne [line 3859]
mixed queryOne(
string
$query, [string
$type = NULL])
|
|
Execute the specified query, fetch the value from the first column of the first row of the result set and then frees the result set.
Parameters:
queryRow [line 3888]
mixed queryRow(
string
$query, [array
$types = NULL], [int
$fetchmode = MDB_FETCHMODE_DEFAULT])
|
|
Execute the specified query, fetch the values from the first row of the result set into an array and then frees the result set.
Parameters:
quoteIdentifier [line 685]
string quoteIdentifier(
string
$str)
|
|
Quote a string so it can be safely used as a table or column name Delimiting style depends on which database driver is being used. NOTE: just because you CAN use delimited identifiers doesn't mean you SHOULD use them. In general, they end up causing way more problems than they solve. Portability is broken by using the following characters inside delimited identifiers: - backtick (`) -- due to MySQL
- double quote (") -- due to Oracle
- brackets ([ or ]) -- due to Access
Delimited identifiers are known to generally work correctly under the following drivers: - mssql
- mysql
- mysqli
- oci8
- odbc(access)
- odbc(db2)
- pgsql
- sqlite
- sybase
InterBase doesn't seem to be able to use delimited identifiers via PHP 4. They work fine under PHP 5.
Overridden in child classes as:
- MDB_mysql::quoteIdentifier()
- Quote a string so it can be safely used as a table or column name
- MDB_mssql::quoteIdentifier()
- Quote a string so it can be safely used as a table / column name
Parameters:
raiseError [line 391]
object a &raiseError(
[mixed
$code = MDB_ERROR], [int
$mode = NULL], [mixed
$options = NULL], [string
$userinfo = NULL], [mixed
$nativecode = NULL])
|
|
This method is used to communicate an error and invoke error callbacks etc. Basically a wrapper for PEAR::raiseError without the message string.
Parameters:
readLob [line 4494]
mixed readLob(
integer
$lob,
&$data, integer
$length, string
$data)
|
|
Read data from large object input stream.
Parameters:
replace [line 1704]
mixed replace(
string
$table, array
$fields)
|
|
Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT query, except that if there is already a row in the table with the same key field values, the REPLACE query just updates its values instead of inserting a new row. The REPLACE type of query does not make part of the SQL standards. Since pratically only MySQL implements it natively, this type of query is emulated through this method for other DBMS using standard types of queries inside a transaction to assure the atomicity of the operation.
Overridden in child classes as:
- MDB_xxx::replace()
- Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT query, except that if there is already a row in the table with the same key field values, the REPLACE query just updates its values instead of inserting a new row.
- MDB_mysql::replace()
- Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT query, except that if there is already a row in the table with the same key field values, the REPLACE query just updates its values instead of inserting a new row.
Parameters:
resetWarnings [line 440]
resultIsNull [line 2781]
mixed resultIsNull(
resource
$result, int
$row, int
$field)
|
|
Determine whether the value of a query result located in given row and field is a NULL.
Overridden in child classes as:
- MDB_xxx::resultIsNull()
- Determine whether the value of a query result located in given row and field is a NULL.
- MDB_ibase::resultIsNull()
- Determine whether the value of a query result located in given row and field is a NULL.
- MDB_oci8::resultIsNull()
- Determine whether the value of a query result located in given row and field is a NULL.
- MDB_pgsql::resultIsNull()
- Determine whether the value of a query result located in given row and field is a NULL.
Parameters:
rollback [line 829]
Cancel any database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after canceling the pending changes.
Overridden in child classes as:
- MDB_xxx::rollback()
- Cancel any database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after canceling the pending changes.
- MDB_ibase::rollback()
- Cancel any database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after canceling the pending changes.
- MDB_mysql::rollback()
- Cancel any database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after canceling the pending changes.
- MDB_fbsql::rollback()
- Cancel any database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after canceling the pending changes.
- MDB_oci8::rollback()
- Cancel any database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after canceling the pending changes.
- MDB_pgsql::rollback()
- Cancel any database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after canceling the pending changes.
- MDB_mssql::rollback()
- Cancel any database changes done during a transaction that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after canceling the pending changes.
setDatabase [line 877]
string setDatabase(
string
$name)
|
|
Select a different database
Parameters:
setDSN [line 894]
MDB_OK setDSN(
$dsn, mixed
$dsninfo)
|
|
set the DSN
Parameters:
setErrorHandler [line 603]
string setErrorHandler(
string
$function)
|
|
Specify a function that is called when an error occurs.
Parameters:
setFetchMode [line 2582]
void setFetchMode(
integer
$fetchmode)
|
|
Sets which fetch mode should be used by default on queries on this connection.
Parameters:
setOption [line 472]
mixed setOption(
string
$option, mixed
$value)
|
|
set the option for the db class
Overridden in child classes as:
- MDB_querysim::setOption()
- Set the option for the MDB class
Parameters:
setParam [line 2098]
mixed setParam(
int
$prepared_query, int
$parameter, string
$type, mixed
$value, [boolean
$is_null = 0], [string
$field = ''])
|
|
Set the value of a parameter of a prepared query.
Parameters:
setParamArray [line 2132]
mixed setParamArray(
int
$prepared_query, array
$params, [array
$types = NULL])
|
|
Set the values of multiple a parameter of a prepared query in bulk.
Parameters:
setParamBlob [line 2280]
mixed setParamBlob(
int
$prepared_query, int
$parameter, int
$value, string
$field)
|
|
Set a parameter of a prepared query with a binary large object value.
Parameters:
setParamBoolean [line 2322]
mixed setParamBoolean(
int
$prepared_query, int
$parameter, boolean
$value)
|
|
Set a parameter of a prepared query with a boolean value.
Parameters:
setParamClob [line 2256]
mixed setParamClob(
int
$prepared_query, int
$parameter, int
$value, string
$field)
|
|
Set a parameter of a prepared query with a character large object value.
Parameters:
setParamDate [line 2343]
mixed setParamDate(
int
$prepared_query, int
$parameter, string
$value)
|
|
Set a parameter of a prepared query with a date value.
Parameters:
setParamDecimal [line 2427]
mixed setParamDecimal(
int
$prepared_query, int
$parameter, string
$value)
|
|
Set a parameter of a prepared query with a decimal value.
Parameters:
setParamFloat [line 2406]
mixed setParamFloat(
int
$prepared_query, int
$parameter, string
$value)
|
|
Set a parameter of a prepared query with a float value.
Parameters:
setParamInteger [line 2301]
mixed setParamInteger(
int
$prepared_query, int
$parameter, int
$value)
|
|
Set a parameter of a prepared query with a text value.
Parameters:
setParamNull [line 2211]
mixed setParamNull(
int
$prepared_query, int
$parameter, string
$type)
|
|
Set the value of a parameter of a prepared query to NULL.
Parameters:
setParamText [line 2232]
mixed setParamText(
int
$prepared_query, int
$parameter, string
$value)
|
|
Set a parameter of a prepared query with a text value.
Parameters:
setParamTime [line 2385]
mixed setParamTime(
int
$prepared_query, int
$parameter, string
$value)
|
|
Set a parameter of a prepared query with a time value.
Parameters:
setParamTimestamp [line 2364]
mixed setParamTimestamp(
int
$prepared_query, int
$parameter, string
$value)
|
|
Set a parameter of a prepared query with a time stamp value.
Parameters:
setResultTypes [line 2455]
mixed setResultTypes(
resource
$result, string
$types)
|
|
Define the list of types to be associated with the columns of a given result set. This function may be called before invoking fetchInto(), fetchOne(), fetchRow(), fetchCol() and fetchAll() so that the necessary data type conversions are performed on the data to be retrieved by them. If this function is not called, the type of all result set columns is assumed to be text, thus leading to not perform any conversions.
Parameters:
setSelectedRowRange [line 1572]
mixed setSelectedRowRange(
string
$first, string
$limit)
|
|
set the range of the next query
Parameters:
subSelect [line 1632]
string subSelect(
string
$query, [string
$quote = FALSE])
|
|
simple subselect emulation: leaves the query untouched for all RDBMS that support subselects
Overridden in child classes as:
- MDB_xxx::subSelect()
- simple subselect emulation for Mysql
- MDB_mysql::subSelect()
- simple subselect emulation for Mysql
Parameters:
support [line 3562]
boolean support(
string
$feature)
|
|
Tell whether a DB implementation or its backend extension supports a given feature.
Parameters:
tableInfo [line 4284]
__toString [line 317]
Documentation generated on Mon, 11 Mar 2019 10:15:22 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|