| [ Index ] |
|
Code source de PHP PEAR 1.4.5 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
| Author: | Lukas Smith <smith@backendmedia.com> |
| Poids: | 4548 lignes (158 kb) |
| Inclus ou requis: | 8 fois |
| Référencé: | 1 fois |
| Nécessite: | 0 fichiers |
MDB_Common:: (150 méthodes):
MDB_Common()
__toString()
errorCode()
errorMessage()
raiseError()
errorNative()
resetWarnings()
getWarnings()
setOption()
getOption()
captureDebugOutput()
debug()
debugOutput()
setError()
setErrorHandler()
error()
_quote()
quoteIdentifier()
_loadModule()
loadLob()
loadManager()
autoCommit()
commit()
rollback()
disconnect()
_close()
setDatabase()
setDSN()
getDSN()
createDatabase()
dropDatabase()
createTable()
dropTable()
alterTable()
listDatabases()
listUsers()
listViews()
listFunctions()
listTables()
listTableFields()
getTableFieldDefinition()
getFieldDeclaration()
getFieldDeclarationList()
_isSequenceName()
createIndex()
dropIndex()
listTableIndexes()
getTableIndexDefinition()
createSequence()
dropSequence()
listSequences()
getSequenceDefinition()
query()
setSelectedRowRange()
limitQuery()
subSelect()
replace()
prepareQuery()
_validatePreparedQuery()
freePreparedQuery()
_executePreparedQuery()
executeQuery()
execute()
executeMultiple()
setParam()
setParamArray()
setParamNull()
setParamText()
setParamClob()
setParamBlob()
setParamInteger()
setParamBoolean()
setParamDate()
setParamTimestamp()
setParamTime()
setParamFloat()
setParamDecimal()
setResultTypes()
affectedRows()
getColumnNames()
numCols()
endOfResult()
setFetchMode()
fetch()
fetchLob()
_retrieveLob()
endOfResultLob()
_readResultLob()
_destroyResultLob()
fetchClob()
fetchBlob()
resultIsNull()
_baseConvertResult()
convertResult()
convertResultRow()
fetchDate()
fetchTimestamp()
fetchTime()
fetchBoolean()
fetchFloat()
fetchDecimal()
numRows()
freeResult()
getIntegerDeclaration()
getTextDeclaration()
getClobDeclaration()
getBlobDeclaration()
getBooleanDeclaration()
getDateDeclaration()
getTimestampDeclaration()
getTimeDeclaration()
getFloatDeclaration()
getDecimalDeclaration()
getIntegerValue()
getTextValue()
getClobValue()
freeClobValue()
getBlobValue()
freeBlobValue()
getBooleanValue()
getDateValue()
getTimestampValue()
getTimeValue()
getFloatValue()
getDecimalValue()
getValue()
support()
getSequenceName()
nextId()
currId()
fetchInto()
fetchOne()
fetchRow()
fetchCol()
fetchAll()
queryOne()
queryRow()
queryCol()
queryAll()
getOne()
getRow()
getCol()
getAssoc()
getAll()
tableInfo()
createLob()
readLob()
endOfLob()
destroyLob()
_MDB_Common()
Classe: MDB_Common - X-Ref
MDB_Common: Base class that is extended by each MDB driver| MDB_Common() X-Ref |
| Constructor |
| __toString() X-Ref |
| String conversation return: string |
| errorCode($nativecode) X-Ref |
| Map native error codes to MDB's portable ones. Requires that the DB implementation's constructor fills in the $errorcode_map property. param: mixed $nativecode the native error code, as returned by the return: int a portable MDB error code, or FALSE if this MDB |
| errorMessage($dbcode) X-Ref |
| Map a MDB error code to a textual message. This is actually just a wrapper for MDB::errorMessage(). param: integer $dbcode the MDB error code return: string the corresponding error message, of FALSE |
| raiseError($code = MDB_ERROR, $mode = NULL, $options = NULL,$userinfo = NULL, $nativecode = NULL) X-Ref |
| This method is used to communicate an error and invoke error callbacks etc. Basically a wrapper for PEAR::raiseError without the message string. param: mixed $code integer error code, or a PEAR error object (all param: int $mode error mode, see PEAR_Error docs param: mixed $options If error mode is PEAR_ERROR_TRIGGER, this is the param: string $userinfo Extra debug information. Defaults to the last param: mixed $nativecode Native error code, integer or string depending return: object a PEAR error object |
| errorNative() X-Ref |
| returns an errormessage, provides by the database return: mixed MDB_Error or message |
| resetWarnings() X-Ref |
| reset the warning array |
| getWarnings() X-Ref |
| get all warnings in reverse order. This means that the last warning is the first element in the array return: array with warnings |
| setOption($option, $value) X-Ref |
| set the option for the db class param: string $option option name param: mixed $value value for the option return: mixed MDB_OK or MDB_Error |
| getOption($option) X-Ref |
| returns the value of an option param: string $option option name return: mixed the option value or error object |
| captureDebugOutput($capture) X-Ref |
| set a debug handler param: string $capture name of the function that should be used in |
| debug($message) X-Ref |
| set a debug message param: string $message Message with information for the user. |
| debugOutput() X-Ref |
| output debug info return: string content of the debug_output class variable |
| setError($scope, $message) X-Ref |
| set an error (deprecated) param: string $scope Scope of the error message param: string $message Message with information for the user. return: boolean FALSE |
| setErrorHandler($function) X-Ref |
| Specify a function that is called when an error occurs. param: string $function Name of the function that will be called on return: string name of last function |
| error() X-Ref |
| 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. return: string the error message text associated with the last failure. |
| _quote($text) X-Ref |
| Quotes a string so it can be safely used in a query. It will quote the text so it can safely be used within a query. param: string $text the input string to quote return: string quoted string |
| quoteIdentifier($str) X-Ref |
| 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 (<kbd>`</kbd>) -- due to MySQL + double quote (<kbd>"</kbd>) -- due to Oracle + brackets (<kbd>[</kbd> or <kbd>]</kbd>) -- 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. param: string $str identifier name to be quoted return: string quoted identifier string |
| _loadModule($scope, $module, $included_constant, $include) X-Ref |
| loads an module param: string $scope information about what method is being loaded, param: string $module name of the module that should be loaded param: string $included_constant name of the constant that should be param: string $include name of the script that includes the module |
| loadLob($scope = '') X-Ref |
| loads the LOB module param: string $scope information about what method is being loaded, |
| loadManager($scope = '') X-Ref |
| loads the Manager module param: string $scope information about what method is being loaded, |
| autoCommit($auto_commit) X-Ref |
| Define whether database changes done on the database be automatically committed. This function may also implicitly start or end a transaction. param: boolean $auto_commit flag that indicates whether the database return: mixed MDB_OK on success, a MDB error on failure |
| commit() X-Ref |
| 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. return: mixed MDB_OK on success, a MDB error on failure |
| rollback() X-Ref |
| 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. return: mixed MDB_OK on success, a MDB error on failure |
| disconnect() X-Ref |
| Log out and disconnect from the database. return: mixed TRUE on success, FALSE if not connected and error |
| _close() X-Ref |
| all the RDBMS specific things needed to close a DB connection |
| setDatabase($name) X-Ref |
| Select a different database param: string $name name of the database that should be selected return: string name of the database previously connected to |
| setDSN($dsn) X-Ref |
| set the DSN param: mixed $dsninfo DSN string or array return: MDB_OK |
| getDSN($type = 'string') X-Ref |
| return the DSN as a string param: string $type type to return return: mixed DSN in the chosen type |
| createDatabase($name) X-Ref |
| create a new database param: string $name name of the database that should be created return: mixed MDB_OK on success, a MDB error on failure |
| dropDatabase($name) X-Ref |
| drop an existing database param: string $name name of the database that should be dropped return: mixed MDB_OK on success, a MDB error on failure |
| createTable($name, $fields) X-Ref |
| create a new table param: string $name Name of the database that should be created param: array $fields Associative array that contains the definition of return: mixed MDB_OK on success, a MDB error on failure |
| dropTable($name) X-Ref |
| drop an existing table param: string $name name of the table that should be dropped return: mixed MDB_OK on success, a MDB error on failure |
| alterTable($name, $changes, $check) X-Ref |
| alter an existing table param: string $name name of the table that is intended to be changed. param: array $changes associative array that contains the details of param: boolean $check indicates whether the function should just check return: mixed MDB_OK on success, a MDB error on failure |
| listDatabases() X-Ref |
| list all databases return: mixed data array on success, a MDB error on failure |
| listUsers() X-Ref |
| list all users return: mixed data array on success, a MDB error on failure |
| listViews() X-Ref |
| list all viewes in the current database return: mixed data array on success, a MDB error on failure |
| listFunctions() X-Ref |
| list all functions in the current database return: mixed data array on success, a MDB error on failure |
| listTables() X-Ref |
| list all tables in the current database return: mixed data array on success, a MDB error on failure |
| listTableFields($table) X-Ref |
| list all fields in a tables in the current database param: string $table name of table that should be used in method return: mixed data array on success, a MDB error on failure |
| getTableFieldDefinition($table, $field) X-Ref |
| get the stucture of a field into an array param: string $table name of table that should be used in method param: string $fields name of field that should be used in method return: mixed data array on success, a MDB error on failure |
| getFieldDeclaration($field_name, $field) X-Ref |
| get declaration of a field param: string $field_name name of the field to be created param: string $field associative array with the name of the properties return: mixed string on success, a MDB error on failure |
| getFieldDeclarationList($fields) X-Ref |
| get declaration of a number of field in bulk param: string $fields a multidimensional associative array. return: mixed string on success, a MDB error on failure |
| _isSequenceName($sqn) X-Ref |
| list all tables in the current database param: string $sqn string that containts name of a potential sequence return: mixed name of the sequence if $sqn is a name of a sequence, else FALSE |
| createIndex($table, $name, $definition) X-Ref |
| get the stucture of a field into an array param: string $table name of the table on which the index is to be param: string $name name of the index to be created param: array $definition associative array that defines properties of return: mixed MDB_OK on success, a MDB error on failure |
| dropIndex($table, $name) X-Ref |
| drop existing index param: string $table name of table that should be used in method param: string $name name of the index to be dropped return: mixed MDB_OK on success, a MDB error on failure |
| listTableIndexes($table) X-Ref |
| list all indexes in a table param: string $table name of table that should be used in method return: mixed data array on success, a MDB error on failure |
| getTableIndexDefinition($table, $index) X-Ref |
| get the stucture of an index into an array param: string $table name of table that should be used in method param: string $index name of index that should be used in method return: mixed data array on success, a MDB error on failure |
| createSequence($name, $start = 1) X-Ref |
| create sequence param: string $name name of the sequence to be created param: string $start start value of the sequence; default is 1 return: mixed MDB_OK on success, a MDB error on failure |
| dropSequence($name) X-Ref |
| drop existing sequence param: string $name name of the sequence to be dropped return: mixed MDB_OK on success, a MDB error on failure |
| listSequences() X-Ref |
| list all tables in the current database return: mixed data array on success, a MDB error on failure |
| getSequenceDefinition($sequence) X-Ref |
| get the stucture of a sequence into an array param: string $sequence name of sequence that should be used in method return: mixed data array on success, a MDB error on failure |
| query($query, $types = NULL) X-Ref |
| Send a query to the database and return any results param: string $query the SQL query param: mixed $types array that contains the types of the columns in return: mixed a result handle or MDB_OK on success, a MDB error on failure |
| setSelectedRowRange($first, $limit) X-Ref |
| set the range of the next query param: string $first first row to select param: string $limit number of rows to select return: mixed MDB_OK on success, a MDB error on failure |
| limitQuery($query, $types = NULL, $from, $count) X-Ref |
| Generates a limited query param: string $query query param: mixed $types array that contains the types of the columns in param: integer $from the row to start to fetching param: integer $count the numbers of rows to fetch return: mixed a valid ressource pointer or a MDB_Error |
| subSelect($query, $quote = FALSE) X-Ref |
| simple subselect emulation: leaves the query untouched for all RDBMS that support subselects param: string $query the SQL query for the subselect that may only param: string $quote determines if the data needs to be quoted before return: string the query |
| replace($table, $fields) X-Ref |
| 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. param: string $table name of the table on which the REPLACE query will param: array $fields associative array that describes the fields and the return: mixed MDB_OK on success, a MDB error on failure |
| prepareQuery($query) X-Ref |
| 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 param: string $ the query to prepare return: mixed resource handle for the prepared query on success, a DB |
| _validatePreparedQuery($prepared_query) X-Ref |
| validate that a handle is infact a prepared query param: int $prepared_query argument is a handle that was returned by |
| freePreparedQuery($prepared_query) X-Ref |
| Release resources allocated for the specified prepared query. param: int $prepared_query argument is a handle that was returned by return: mixed MDB_OK on success, a MDB error on failure |
| _executePreparedQuery($prepared_query, $query, $types = NULL) X-Ref |
| Execute a prepared query statement. param: int $prepared_query argument is a handle that was returned by param: string $query query to be executed param: array $types array that contains the types of the columns in return: mixed a result handle or MDB_OK on success, a MDB error on failure |
| executeQuery($prepared_query, $types = NULL) X-Ref |
| Execute a prepared query statement. param: int $prepared_query argument is a handle that was returned by param: array $types array that contains the types of the columns in the return: mixed a result handle or MDB_OK on success, a MDB error on failure |
| execute($prepared_query, $types = NULL, $params = FALSE, $param_types = NULL) X-Ref |
| 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 param: resource $prepared_query query handle from prepare() param: array $types array that contains the types of the columns in param: array $params numeric array containing the data to insert into param: array $param_types array that contains the types of the values return: mixed a new result handle or a MDB_Error when fail |
| executeMultiple($prepared_query, $types = NULL, $params, $param_types = NULL) X-Ref |
| 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. param: resource $stmt query handle from prepare() param: array $types array that contains the types of the columns in param: array $params numeric array containing the param: array $parAM_types array that contains the types of the values return: mixed a result handle or MDB_OK on success, a MDB error on failure |
| setParam($prepared_query, $parameter, $type, $value, $is_null = 0, $field = '') X-Ref |
| Set the value of a parameter of a prepared query. param: int $prepared_query argument is a handle that was returned param: int $parameter the order number of the parameter in the query param: string $type designation of the type of the parameter to be set. param: mixed $value value that is meant to be assigned to specified param: boolean $is_null flag that indicates whether whether the param: string $field name of the field that is meant to be assigned return: mixed MDB_OK on success, a MDB error on failure |
| setParamArray($prepared_query, $params, $types = NULL) X-Ref |
| Set the values of multiple a parameter of a prepared query in bulk. param: int $prepared_query argument is a handle that was returned by param: array $params array thats specifies all necessary infromation param: array $types array thats specifies the types of the fields return: mixed MDB_OK on success, a MDB error on failure |
| setParamNull($prepared_query, $parameter, $type) X-Ref |
| Set the value of a parameter of a prepared query to NULL. param: int $prepared_query argument is a handle that was returned by param: int $parameter order number of the parameter in the query param: string $type designation of the type of the parameter to be set. return: mixed MDB_OK on success, a MDB error on failure |
| setParamText($prepared_query, $parameter, $value) X-Ref |
| Set a parameter of a prepared query with a text value. param: int $prepared_query argument is a handle that was returned by param: int $parameter order number of the parameter in the query param: string $value text value that is meant to be assigned to return: mixed MDB_OK on success, a MDB error on failure |
| setParamClob($prepared_query, $parameter, $value, $field) X-Ref |
| Set a parameter of a prepared query with a character large object value. param: int $prepared_query argument is a handle that was returned by param: int $parameter order number of the parameter in the query param: int $value handle of large object created with createLOB() param: string $field name of the field of a INSERT or UPDATE query to return: mixed MDB_OK on success, a MDB error on failure |
| setParamBlob($prepared_query, $parameter, $value, $field) X-Ref |
| Set a parameter of a prepared query with a binary large object value. param: int $prepared_query argument is a handle that was returned by param: int $parameter order number of the parameter in the query param: int $value handle of large object created with createLOB() param: string $field name of the field of a INSERT or UPDATE query to return: mixed MDB_OK on success, a MDB error on failure |
| setParamInteger($prepared_query, $parameter, $value) X-Ref |
| Set a parameter of a prepared query with a text value. param: int $prepared_query argument is a handle that was returned by param: int $parameter order number of the parameter in the query param: int $value an integer value that is meant to be assigned to return: mixed MDB_OK on success, a MDB error on failure |
| setParamBoolean($prepared_query, $parameter, $value) X-Ref |
| Set a parameter of a prepared query with a boolean value. param: int $prepared_query argument is a handle that was returned by param: int $parameter order number of the parameter in the query param: boolean $value boolean value that is meant to be assigned to return: mixed MDB_OK on success, a MDB error on failure |
| setParamDate($prepared_query, $parameter, $value) X-Ref |
| Set a parameter of a prepared query with a date value. param: int $prepared_query argument is a handle that was returned by param: int $parameter order number of the parameter in the query param: string $value date value that is meant to be assigned to return: mixed MDB_OK on success, a MDB error on failure |
| setParamTimestamp($prepared_query, $parameter, $value) X-Ref |
| Set a parameter of a prepared query with a time stamp value. param: int $prepared_query argument is a handle that was returned by param: int $parameter order number of the parameter in the query param: string $value time stamp value that is meant to be assigned to return: mixed MDB_OK on success, a MDB error on failure |
| setParamTime($prepared_query, $parameter, $value) X-Ref |
| Set a parameter of a prepared query with a time value. param: int $prepared_query argument is a handle that was returned by param: int $parameter order number of the parameter in the query param: string $value time value that is meant to be assigned to return: mixed MDB_OK on success, a MDB error on failure |
| setParamFloat($prepared_query, $parameter, $value) X-Ref |
| Set a parameter of a prepared query with a float value. param: int $prepared_query argument is a handle that was returned by param: int $parameter order number of the parameter in the query param: string $value float value that is meant to be assigned to return: mixed MDB_OK on success, a MDB error on failure |
| setParamDecimal($prepared_query, $parameter, $value) X-Ref |
| Set a parameter of a prepared query with a decimal value. param: int $prepared_query argument is a handle that was returned by param: int $parameter order number of the parameter in the query param: string $value decimal value that is meant to be assigned to return: mixed MDB_OK on success, a MDB error on failure |
| setResultTypes($result, $types) X-Ref |
| 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. param: resource $result result identifier param: string $types array variable that lists the return: mixed MDB_OK on success, a MDB error on failure |
| affectedRows() X-Ref |
| returns the affected rows of a query return: mixed MDB_Error or number of rows |
| getColumnNames($result) X-Ref |
| Retrieve the names of columns returned by the DBMS in a query result. param: resource $result result identifier return: mixed associative array variable |
| numCols($result) X-Ref |
| Count the number of columns returned by the DBMS in a query result. param: resource $result result identifier return: mixed integer value with the number of columns, a MDB error |
| endOfResult($result) X-Ref |
| check if the end of the result set has been reached param: resource $result result identifier return: mixed TRUE or FALSE on sucess, a MDB error on failure |
| setFetchMode($fetchmode) X-Ref |
| Sets which fetch mode should be used by default on queries on this connection. param: integer $fetchmode MDB_FETCHMODE_ORDERED or MDB_FETCHMODE_ASSOC, |
| fetch($result, $row, $field) X-Ref |
| fetch value from a result set param: resource $result result identifier param: int $row number of the row where the data can be found param: int $field field number where the data can be found return: mixed string on success, a MDB error on failure |
| fetchLob($result, $row, $field) X-Ref |
| fetch a lob value from a result set param: resource $result result identifier param: int $row number of the row where the data can be found param: int $field field number where the data can be found return: mixed string on success, a MDB error on failure |
| _retrieveLob($lob) X-Ref |
| fetch a float value from a result set param: int $lob handle to a lob created by the createLob() function return: mixed MDB_OK on success, a MDB error on failure |
| endOfResultLob($lob) X-Ref |
| 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. param: int $lob handle to a lob created by the createLob() function return: mixed TRUE or FALSE on success, a MDB error on failure |
| _readResultLob($lob, &$data, $length) X-Ref |
| Read data from large object input stream. param: int $lob handle to a lob created by the createLob() function param: blob $data reference to a variable that will hold data to be param: int $length integer value that indicates the largest ammount of return: mixed length on success, a MDB error on failure |
| _destroyResultLob($lob) X-Ref |
| Free any resources allocated during the lifetime of the large object handler object. param: int $lob handle to a lob created by the createLob() function |
| fetchClob($result, $row, $field) X-Ref |
| fetch a clob value from a result set param: resource $result result identifier param: int $row number of the row where the data can be found param: int $field field number where the data can be found return: mixed content of the specified data cell, a MDB error on failure, |
| fetchBlob($result, $row, $field) X-Ref |
| fetch a blob value from a result set param: resource $result result identifier param: int $row number of the row where the data can be found param: int $field field number where the data can be found return: mixed content of the specified data cell, a MDB error on failure |
| resultIsNull($result, $row, $field) X-Ref |
| Determine whether the value of a query result located in given row and field is a NULL. param: resource $result result identifier param: int $row number of the row where the data can be found param: int $field field number where the data can be found return: mixed TRUE or FALSE on success, a MDB error on failure |
| _baseConvertResult($value, $type) X-Ref |
| general type conversion method param: mixed $value refernce to a value to be converted param: int $type constant that specifies which type to convert to return: object a MDB error on failure |
| convertResult($value, $type) X-Ref |
| convert a value to a RDBMS indepdenant MDB type param: mixed $value value to be converted param: int $type constant that specifies which type to convert to return: mixed converted value or a MDB error on failure |
| convertResultRow($result, $row) X-Ref |
| convert a result row param: resource $result result identifier param: array $row array with data return: mixed MDB_OK on success, a MDB error on failure |
| fetchDate($result, $row, $field) X-Ref |
| fetch a date value from a result set param: resource $result result identifier param: int $row number of the row where the data can be found param: int $field field number where the data can be found return: mixed content of the specified data cell, a MDB error on failure |
| fetchTimestamp($result, $row, $field) X-Ref |
| fetch a timestamp value from a result set param: resource $result result identifier param: int $row number of the row where the data can be found param: int $field field number where the data can be found return: mixed content of the specified data cell, a MDB error on failure |
| fetchTime($result, $row, $field) X-Ref |
| fetch a time value from a result set param: resource $result result identifier param: int $row number of the row where the data can be found param: int $field field number where the data can be found return: mixed content of the specified data cell, a MDB error on failure |
| fetchBoolean($result, $row, $field) X-Ref |
| fetch a boolean value from a result set param: resource $result result identifier param: int $row number of the row where the data can be found param: int $field field number where the data can be found return: mixed content of the specified data cell, a MDB error on failure |
| fetchFloat($result, $row, $field) X-Ref |
| fetch a float value from a result set param: resource $result result identifier param: int $row number of the row where the data can be found param: int $field field number where the data can be found return: mixed content of the specified data cell, a MDB error on failure |
| fetchDecimal($result, $row, $field) X-Ref |
| fetch a decimal value from a result set param: resource $result result identifier param: int $row number of the row where the data can be found param: int $field field number where the data can be found return: mixed content of the specified data cell, a MDB error on failure |
| numRows($result) X-Ref |
| returns the number of rows in a result object param: ressource $result a valid result ressouce pointer return: mixed MDB_Error or the number of rows |
| freeResult($result) X-Ref |
| Free the internal resources associated with $result. param: $result result identifier return: boolean TRUE on success, FALSE if $result is invalid |
| getIntegerDeclaration($name, $field) X-Ref |
| Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE. param: string $name name the field to be declared. param: string $field associative array with the name of the properties return: string DBMS specific SQL code portion that should be used to |
| getTextDeclaration($name, $field) X-Ref |
| Obtain DBMS specific SQL code portion needed to declare an text type field to be used in statements like CREATE TABLE. param: string $name name the field to be declared. param: string $field associative array with the name of the properties return: string DBMS specific SQL code portion that should be used to |
| getClobDeclaration($name, $field) X-Ref |
| Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE. param: string $name name the field to be declared. param: string $field associative array with the name of the properties return: string DBMS specific SQL code portion that should be used to |
| getBlobDeclaration($name, $field) X-Ref |
| Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE. param: string $name name the field to be declared. param: string $field associative array with the name of the properties return: string DBMS specific SQL code portion that should be used to |
| getBooleanDeclaration($name, $field) X-Ref |
| Obtain DBMS specific SQL code portion needed to declare a boolean type field to be used in statements like CREATE TABLE. param: string $name name the field to be declared. param: string $field associative array with the name of the properties return: string DBMS specific SQL code portion that should be used to |
| getDateDeclaration($name, $field) X-Ref |
| Obtain DBMS specific SQL code portion needed to declare a date type field to be used in statements like CREATE TABLE. param: string $name name the field to be declared. param: string $field associative array with the name of the properties return: string DBMS specific SQL code portion that should be used to |
| getTimestampDeclaration($name, $field) X-Ref |
| Obtain DBMS specific SQL code portion needed to declare a timestamp field to be used in statements like CREATE TABLE. param: string $name name the field to be declared. param: string $field associative array with the name of the properties return: string DBMS specific SQL code portion that should be used to |
| getTimeDeclaration($name, $field) X-Ref |
| Obtain DBMS specific SQL code portion needed to declare a time field to be used in statements like CREATE TABLE. param: string $name name the field to be declared. param: string $field associative array with the name of the properties return: string DBMS specific SQL code portion that should be used to |
| getFloatDeclaration($name, $field) X-Ref |
| Obtain DBMS specific SQL code portion needed to declare a float type field to be used in statements like CREATE TABLE. param: string $name name the field to be declared. param: string $field associative array with the name of the properties return: string DBMS specific SQL code portion that should be used to |
| getDecimalDeclaration($name, $field) X-Ref |
| Obtain DBMS specific SQL code portion needed to declare a decimal type field to be used in statements like CREATE TABLE. param: string $name name the field to be declared. param: string $field associative array with the name of the properties return: string DBMS specific SQL code portion that should be used to |
| getIntegerValue($value) X-Ref |
| Convert a text value into a DBMS specific format that is suitable to compose query statements. param: string $value text string value that is intended to be converted. return: string text string that represents the given argument value in |
| getTextValue($value) X-Ref |
| Convert a text value into a DBMS specific format that is suitable to compose query statements. param: string $value text string value that is intended to be converted. return: string text string that already contains any DBMS specific |
| getClobValue($prepared_query, $parameter, $clob) X-Ref |
| Convert a text value into a DBMS specific format that is suitable to compose query statements. param: resource $prepared_query query handle from prepare() param: $parameter param: $clob return: string text string that represents the given argument value in |
| freeClobValue($prepared_query, $clob, &$value) X-Ref |
| free a character large object param: resource $prepared_query query handle from prepare() param: string $blob param: string $value |
| getBlobValue($prepared_query, $parameter, $blob) X-Ref |
| Convert a text value into a DBMS specific format that is suitable to compose query statements. param: resource $prepared_query query handle from prepare() param: $parameter param: $blob return: string text string that represents the given argument value in |
| freeBlobValue($prepared_query, $blob, &$value) X-Ref |
| free a binary large object param: resource $prepared_query query handle from prepare() param: string $blob param: string $value |
| getBooleanValue($value) X-Ref |
| Convert a text value into a DBMS specific format that is suitable to compose query statements. param: string $value text string value that is intended to be converted. return: string text string that represents the given argument value in |
| getDateValue($value) X-Ref |
| Convert a text value into a DBMS specific format that is suitable to compose query statements. param: string $value text string value that is intended to be converted. return: string text string that represents the given argument value in |
| getTimestampValue($value) X-Ref |
| Convert a text value into a DBMS specific format that is suitable to compose query statements. param: string $value text string value that is intended to be converted. return: string text string that represents the given argument value in |
| getTimeValue($value) X-Ref |
| Convert a text value into a DBMS specific format that is suitable to compose query statements. param: string $value text string value that is intended to be converted. return: string text string that represents the given argument value in |
| getFloatValue($value) X-Ref |
| Convert a text value into a DBMS specific format that is suitable to compose query statements. param: string $value text string value that is intended to be converted. return: string text string that represents the given argument value in |
| getDecimalValue($value) X-Ref |
| Convert a text value into a DBMS specific format that is suitable to compose query statements. param: string $value text string value that is intended to be converted. return: string text string that represents the given argument value in |
| getValue($type, $value) X-Ref |
| Convert a text value into a DBMS specific format that is suitable to compose query statements. param: string $type type to which the value should be converted to param: string $value text string value that is intended to be converted. return: string text string that represents the given argument value in |
| support($feature) X-Ref |
| Tell whether a DB implementation or its backend extension supports a given feature. param: string $feature name of the feature (see the MDB class doc) return: boolean whether this DB implementation supports $feature |
| getSequenceName($sqn) X-Ref |
| adds sequence name formating to a sequence name param: string $sqn name of the sequence return: string formatted sequence name |
| nextId($seq_name, $ondemand = FALSE) X-Ref |
| returns the next free id of a sequence param: string $seq_name name of the sequence param: boolean $ondemand when TRUE the seqence is return: mixed MDB_Error or id |
| currId($seq_name) X-Ref |
| returns the current id of a sequence param: string $seq_name name of the sequence return: mixed MDB_Error or id |
| fetchInto($result, $fetchmode = MDB_FETCHMODE_DEFAULT, $rownum = NULL) X-Ref |
| Fetch a row and return data in an array. param: resource $result result identifier param: int $fetchmode ignored param: int $rownum the row number to fetch return: mixed data array or NULL on success, a MDB error on failure |
| fetchOne($result) X-Ref |
| Fetch and return a field of data (it uses fetchInto for that) param: resource $result result identifier return: mixed data on success, a MDB error on failure |
| fetchRow($result, $fetchmode = MDB_FETCHMODE_DEFAULT, $rownum = NULL) X-Ref |
| Fetch and return a row of data (it uses fetchInto for that) param: resource $result result identifier param: int $fetchmode how the array data should be indexed param: int $rownum the row number to fetch return: mixed data array on success, a MDB error on failure |
| fetchCol($result, $colnum = 0) X-Ref |
| Fetch and return a column of data (it uses fetchInto for that) param: resource $result result identifier param: int $colnum the row number to fetch return: mixed data array on success, a MDB error on failure |
| fetchAll($result, $fetchmode = MDB_FETCHMODE_DEFAULT, $rekey = FALSE, $force_array = FALSE, $group = FALSE) X-Ref |
| Fetch and return a column of data (it uses fetchInto for that) param: resource $result result identifier param: int $fetchmode how the array data should be indexed param: boolean $rekey if set to TRUE, the $all will have the first param: boolean $force_array used only when the query returns exactly param: boolean $group if TRUE, the values of the returned array is return: mixed data array on success, a MDB error on failure |
| queryOne($query, $type = NULL) X-Ref |
| 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. param: string $query the SELECT query statement to be executed. param: string $type optional argument that specifies the expected return: mixed field value on success, a MDB error on failure |
| queryRow($query, $types = NULL, $fetchmode = MDB_FETCHMODE_DEFAULT) X-Ref |
| Execute the specified query, fetch the values from the first row of the result set into an array and then frees the result set. param: string $query the SELECT query statement to be executed. param: array $types optional array argument that specifies a list of param: int $fetchmode how the array data should be indexed return: mixed data array on success, a MDB error on failure |
| queryCol($query, $type = NULL, $colnum = 0) X-Ref |
| 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. param: string $query the SELECT query statement to be executed. param: string $type optional argument that specifies the expected param: int $colnum the row number to fetch return: mixed data array on success, a MDB error on failure |
| queryAll($query, $types = NULL, $fetchmode = MDB_FETCHMODE_DEFAULT,$rekey = FALSE, $force_array = FALSE, $group = FALSE) X-Ref |
| Execute the specified query, fetch all the rows of the result set into a two dimensional array and then frees the result set. param: string $query the SELECT query statement to be executed. param: array $types optional array argument that specifies a list of param: int $fetchmode how the array data should be indexed param: boolean $rekey if set to TRUE, the $all will have the first param: boolean $force_array used only when the query returns exactly param: boolean $group if TRUE, the values of the returned array is return: mixed data array on success, a MDB error on failure |
| getOne($query, $type = NULL, $params = array() X-Ref |
| 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. param: string $query the SQL query param: string $type string that contains the type of the column in the param: array $params if supplied, prepare/execute will be used param: array $param_types array that contains the types of the values return: mixed MDB_Error or the returned value of the query |
| getRow($query, $types = NULL, $params = array() X-Ref |
| Fetch the first row of data returned from a query. Takes care of doing the query and freeing the results when finished. param: string $query the SQL query param: array $types array that contains the types of the columns in param: array $params array if supplied, prepare/execute will be used param: array $param_types array that contains the types of the values param: integer $fetchmode the fetch mode to use return: array the first row of results as an array indexed from |
| getCol($query, $type = NULL, $params = array() X-Ref |
| Fetch a single column from a result set and return it as an indexed array. param: string $query the SQL query param: string $type string that contains the type of the column in the param: array $params array if supplied, prepare/execute will be used param: array $param_types array that contains the types of the values param: mixed $colnum which column to return(integer [column number, return: array an indexed array with the data from the first |
| getAssoc($query, $types = NULL, $params = array() X-Ref |
| 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 -------------------------------- 1 'one' 944679408 2 'two' 944679408 3 '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. param: string $query the SQL query param: array $types array that contains the types of the columns in param: array $params array if supplied, prepare/execute will be used param: array $param_types array that contains the types of the values param: boolean $force_array used only when the query returns param: boolean $group if TRUE, the values of the returned array return: array associative array with results from the query. |
| getAll($query, $types = NULL, $params = array() X-Ref |
| Fetch all the rows returned from a query. param: string $query the SQL query param: array $types array that contains the types of the columns in param: array $params array if supplied, prepare/execute will be used param: array $param_types array that contains the types of the values param: integer $fetchmode the fetch mode to use return: array an nested array, or a MDB error |
| tableInfo($result, $mode = NULL) X-Ref |
| returns meta data about the result set param: resource $result result identifier param: mixed $mode depends on implementation return: array an nested array, or a MDB error |
| createLob($arguments) X-Ref |
| Create a handler object of a specified class with functions to retrieve data from a large object data stream. param: array $arguments An associative array with parameters to create return: integer handle value that should be passed as argument insubsequent |
| readLob($lob, &$data, $length) X-Ref |
| Read data from large object input stream. param: integer $lob argument handle that is returned by the param: string $data reference to a variable that will hold data param: integer $length value that indicates the largest ammount ofdata return: mixed the effective number of bytes read from the large object |
| endOfLob($lob) X-Ref |
| 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. param: integer $lob argument handle that is returned by the return: boolean flag that indicates whether it was reached the end of the large object input stream |
| destroyLob($lob) X-Ref |
| Free any resources allocated during the lifetime of the large object handler object. param: integer $lob argument handle that is returned by the |
| _MDB_Common() X-Ref |
| this function closes open transactions to be executed at shutdown |
| MDB_defaultDebugOutput(&$db, $message) X-Ref |
| default debug output handler param: object $db reference to an MDB database object param: string $message message that should be appended to the debug return: string the corresponding error message, of FALSE |
| Généré le : Sun Feb 25 14:08:00 2007 | par Balluche grâce à PHPXref 0.7 |