| apidoc |
| [ class tree: apidoc ] [ index: apidoc ] [ all elements ] |
|
Packages: DB Classes: |
[ Top ] $prepared_queries =[line 68]
[ Top ] $prepare_maxstmt = 0[line 73]
[ Top ] $prepare_tokens =[line 58]
[ Top ] $prepare_types =[line 63]
[ Top ] $type =[line 53] DB type (mysql, oci8, odbc etc.)
[ Top ] Method DetailDB_common (Constructor) [line 137]affectedRows [line 1240]
returns the affected rows of a query
Overridden in child classes as:
[ Top ]
autoCommit [line 1182]
enable automatic Commit
Overridden in child classes as:
Parameters:
[ Top ]
autoExecute [line 468]
Make automaticaly an insert or update query and call prepare() and execute() with it
Parameters:
[ Top ]
autoPrepare [line 447]
Make automaticaly an insert or update query and call prepare() with it
Parameters:
[ Top ]
buildManipSQL [line 494]
Make automaticaly an sql query for prepare() Example : buildManipSQL('table_sql', array('field1', 'field2', 'field3'), DB_AUTOQUERY_INSERT) will return the string : INSERT INTO table_sql (field1,field2,field3) VALUES (?,?,?) NB : - This belongs more to a SQL Builder class, but this is a simple facility
Parameters:
[ Top ]
commit [line 1196]
starts a Commit
Overridden in child classes as:
[ Top ]
createSequence [line 1287]
creates a new sequence
Overridden in child classes as:
Parameters:
[ Top ]
dropSequence [line 1303]
deletes a sequence
Overridden in child classes as:
Parameters:
[ Top ]
errorCode [line 214]
Map native error codes to DB's portable ones. Requires that the DB implementation's constructor fills in the $errorcode_map property.
Overridden in child classes as:
Parameters:
[ Top ]
errorMessage [line 238]
Map a DB error code to a textual message. This is actually just a wrapper for DB::errorMessage().
Parameters:
[ Top ]
errorNative [line 1254]
returns an errormessage, provides by the database
Overridden in child classes as:
[ Top ]
execute [line 555]
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
Overridden in child classes as:
Parameters:
[ Top ]
executeMultiple [line 661]
This function does several execute() calls on the same statement handle. $data 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:
[ Top ]
getAll [line 1113]
Fetch all the rows returned from a query.
Parameters:
[ Top ]
getAssoc [line 1017]
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 DB error code is returned on errors. If the result set contains fewer than two columns, a DB_ERROR_TRUNCATED error is returned. For example, if the table "mytable" contains: ID TEXT DATE --------------------------------
...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', false, null, DB_FETCHMODE_ASSOC, 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:
[ Top ]
getCol [line 903]
Fetch a single column from a result set and return it as an indexed array.
Parameters:
[ Top ]
getListOf [line 1348]
list internal DB info valid values for $type are db dependent, often: databases, users, view, functions
Parameters:
[ Top ]
getOne [line 789]
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:
[ Top ]
getOption [line 372]
returns the value of an option
Parameters:
[ Top ]
getRow [line 836]
Fetch the first row of data returned from a query. Takes care of doing the query and freeing the results when finished.
Parameters:
[ Top ]
getSequenceName [line 1363]getTables [line 1330]limitQuery [line 758]
Generates a limited query
Parameters:
[ Top ]
nextId [line 1271]
returns the next free id of a sequence
Overridden in child classes as:
Parameters:
[ Top ]
numRows [line 1226]
returns the number of rows in a result object
Overridden in child classes as:
Parameters:
[ Top ]
prepare [line 403]
Prepares a query for multiple execution with execute(). With some database backends, this is emulated. prepare() 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 & - requires a file name, the content of the file insert into the query (i.e. saving binary data in a db) ! - value is inserted 'as is'
Overridden in child classes as:
Parameters:
[ Top ]
provides [line 192]
Tell whether a DB implementation or its backend extension supports a given feature.
Parameters:
[ Top ]
query [line 727]
Send a query to the database and return any results with a DB_result object.
Overridden in child classes as: Parameters:
[ Top ]
quote [line 175]
Quotes a string so it can be safely used in a query. It will return the string with single quotes around. Other backend quote styles should override this method.
Overridden in child classes as:
Parameters:
[ Top ]
quoteString [line 156]
Quotes a string so it can be safely used within string delimiters in a query (preserved for compatibility issues, quote() is preffered).
[ Top ]
raiseError [line 275]
This method is used to communicate an error and invoke error callbacks etc. Basically a wrapper for PEAR::raiseError without the message string.
Parameters:
[ Top ]
rollback [line 1210]
starts a rollback
Overridden in child classes as:
[ Top ]
setFetchMode [line 328]
Sets which fetch mode should be used by default on queries on this connection.
Parameters:
[ Top ]
setOption [line 354]
set the option for the db class
Parameters:
[ Top ]
tableInfo [line 1320]
returns meta data about the result set
Overridden in child classes as:
Parameters:
[ Top ]
Documentation generated on Fri, 30 Apr 2004 23:19:42 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004. |