

Fonctions membres publiques | |
| ADORecordSet ($queryID) | |
| Init () | |
| GetMenu ($name, $defstr='', $blank1stItem=true, $multiple=false, $size=0, $selectAttr='', $compareFields0=true) | |
| GetMenu2 ($name, $defstr='', $blank1stItem=true, $multiple=false, $size=0, $selectAttr='') | |
| GetMenu3 ($name, $defstr='', $blank1stItem=true, $multiple=false, $size=0, $selectAttr='') | |
| & | GetArray ($nRows=-1) |
| & | GetAll ($nRows=-1) |
| NextRecordSet () | |
| & | GetArrayLimit ($nrows, $offset=-1) |
| & | GetRows ($nRows=-1) |
| & | GetAssoc ($force_array=false, $first2cols=false) |
| UserTimeStamp ($v, $fmt='Y-m-d H:i:s') | |
| UserDate ($v, $fmt='Y-m-d') | |
| UnixDate ($v) | |
| UnixTimeStamp ($v) | |
| Free () | |
| NumRows () | |
| NumCols () | |
| & | FetchRow () |
| FetchInto (&$arr) | |
| MoveFirst () | |
| MoveLast () | |
| MoveNext () | |
| Move ($rowNumber=0) | |
| Fields ($colname) | |
| GetAssocKeys ($upper=true) | |
| & | GetRowAssoc ($upper=1) |
| Close () | |
| RecordCount () | |
| MaxRecordCount () | |
| RowCount () | |
| PO_RecordCount ($table="", $condition="") | |
| CurrentRow () | |
| AbsolutePosition () | |
| FieldCount () | |
| & | FetchField ($fieldoffset) |
| & | FieldTypesArray () |
| & | FetchObj () |
| & | FetchObject ($isupper=true) |
| & | FetchNextObj () |
| & | FetchNextObject ($isupper=true) |
| MetaType ($t, $len=-1, $fieldobj=false) | |
| _close () | |
| AbsolutePage ($page=-1) | |
| AtFirstPage ($status=false) | |
| LastPageNo ($page=false) | |
| AtLastPage ($status=false) | |
Attributs publics | |
| $dataProvider = "native" | |
| $fields = false | |
| $blobSize = 100 | |
| holds the current row data | |
| $canSeek = false | |
| in other words, we use a text area for editing. | |
| $sql | |
| indicates that seek is supported | |
| $EOF = false | |
| sql text | |
| $emptyTimeStamp = ' ' | |
| Indicates that the current record position is after the last record in a Recordset object. | |
| $emptyDate = ' ' | |
| what to display when $time==0 | |
| $debug = false | |
| what to display when $time==0 | |
| $timeCreated = 0 | |
| $bind = false | |
| datetime in Unix format rs created -- for cached recordsets | |
| $fetchMode | |
| used by Fields() to hold array - should be private? | |
| $connection = false | |
| default fetch mode | |
| $_numOfRows = -1 | |
| the parent connection | |
| $_numOfFields = -1 | |
| $_queryID = -1 | |
| $_currentRow = -1 | |
| $_closed = false | |
| $_inited = false | |
| $_obj | |
| $_names | |
| $_currentPage = -1 | |
| $_atFirstPage = false | |
| $_atLastPage = false | |
| $_lastPageNo = -1 | |
| $_maxRecordCount = 0 | |
| $datetime = false | |
| ADORecordSet::ADORecordSet | ( | $ | queryID | ) |
| ADORecordSet::Init | ( | ) |
Réimplémentée dans ADORecordset_oci8, et ADORecordSet_pdo.
| ADORecordSet::GetMenu | ( | $ | name, | |
| $ | defstr = '', |
|||
| $ | blank1stItem = true, |
|||
| $ | multiple = false, |
|||
| $ | size = 0, |
|||
| $ | selectAttr = '', |
|||
| $ | compareFields0 = true | |||
| ) |
Generate a SELECT tag string from a recordset, and return the string. If the recordset has 2 cols, we treat the 1st col as the containing the text to display to the user, and 2nd col as the return value. Default strings are compared with the FIRST column.
| name | name of SELECT tag | |
| [defstr] | the value to hilite. Use an array for multiple hilites for listbox. | |
| [blank1stItem] | true to leave the 1st item in list empty | |
| [multiple] | true for listbox, false for popup | |
| [size] | rows to show for listbox. not used by popup | |
| [selectAttr] | additional attributes to defined for SELECT tag. useful for holding javascript onChange='...' handlers. & | |
| [compareFields0] | when we have 2 cols in recordset, we compare the defstr with column 0 (1st col) if this is true. This is not documented. |
| ADORecordSet::GetMenu2 | ( | $ | name, | |
| $ | defstr = '', |
|||
| $ | blank1stItem = true, |
|||
| $ | multiple = false, |
|||
| $ | size = 0, |
|||
| $ | selectAttr = '' | |||
| ) |
Generate a SELECT tag string from a recordset, and return the string. If the recordset has 2 cols, we treat the 1st col as the containing the text to display to the user, and 2nd col as the return value. Default strings are compared with the SECOND column.
| ADORecordSet::GetMenu3 | ( | $ | name, | |
| $ | defstr = '', |
|||
| $ | blank1stItem = true, |
|||
| $ | multiple = false, |
|||
| $ | size = 0, |
|||
| $ | selectAttr = '' | |||
| ) |
| & ADORecordSet::GetArray | ( | $ | nRows = -1 |
) |
return recordset as a 2-dimensional array.
| [nRows] | is the number of rows to return. -1 means every row. |
Réimplémentée dans ADORecordSet_array.
| & ADORecordSet::GetAll | ( | $ | nRows = -1 |
) |
| ADORecordSet::NextRecordSet | ( | ) |
Réimplémentée dans ADORecordSet_ado, ADORecordSet_ado, et ADORecordSet_odbtp.
| & ADORecordSet::GetArrayLimit | ( | $ | nrows, | |
| $ | offset = -1 | |||
| ) |
return recordset as a 2-dimensional array. Helper function for ADOConnection->SelectLimit()
| offset | is the row to start calculations from (1-based) | |
| [nrows] | is the number of rows to return |
Réimplémentée dans ADORecordSet_db2, ADORecordset_oci8, ADORecordset_oci8po, et ADORecordSet_odbc.
| & ADORecordSet::GetRows | ( | $ | nRows = -1 |
) |
Synonym for GetArray() for compatibility with ADO.
| [nRows] | is the number of rows to return. -1 means every row. |
return whole recordset as a 2-dimensional associative array if there are more than 2 columns. The first column is treated as the key and is not included in the array. If there is only 2 columns, it will return a 1 dimensional array of key-value pairs unless $force_array == true.
| [force_array] | has only meaning if we have 2 data columns. If false, a 1 dimensional array is returned, otherwise a 2 dimensional array is returned. If this sounds confusing, read the source. | |
| [first2cols] | means if there are more than 2 cols, ignore the remaining cols and instead of returning array[col0] => array(remaining cols), return array[col0] => col1 |
Réimplémentée dans ADORecordSet_ldap.
| ADORecordSet::UserTimeStamp | ( | $ | v, | |
| $ | fmt = 'Y-m-d H:i:s' | |||
| ) |
| v | is the character timestamp in YYYY-MM-DD hh:mm:ss format | |
| fmt | is the format to apply to it, using date() |
| ADORecordSet::UserDate | ( | $ | v, | |
| $ | fmt = 'Y-m-d' | |||
| ) |
| v | is the character date in YYYY-MM-DD format, returned by database | |
| fmt | is the format to apply to it, using date() |
| ADORecordSet::UnixDate | ( | $ | v | ) |
| $v | is a date string in YYYY-MM-DD format |
Réimplémentée dans ADORecordset_sybase, et ADORecordSet_array_sybase.
| ADORecordSet::UnixTimeStamp | ( | $ | v | ) |
| $v | is a timestamp string in YYYY-MM-DD HH-NN-SS format |
Réimplémentée dans ADORecordset_sybase, et ADORecordSet_array_sybase.
| ADORecordSet::Free | ( | ) |
PEAR DB Compat - do not use internally
| ADORecordSet::NumRows | ( | ) |
PEAR DB compat, number of rows
| ADORecordSet::NumCols | ( | ) |
PEAR DB compat, number of cols
| & ADORecordSet::FetchRow | ( | ) |
Fetch a row, returning false if no more rows. This is PEAR DB compat mode.
| ADORecordSet::FetchInto | ( | &$ | arr | ) |
Fetch a row, returning PEAR_Error if no more rows. This is PEAR DB compat mode.
| ADORecordSet::MoveFirst | ( | ) |
Move to the first row in the recordset. Many databases do NOT support this.
Réimplémentée dans ADORecordset_informix72, et ADORecordSet_odbtp.
| ADORecordSet::MoveLast | ( | ) |
Move to the last row in the recordset.
Réimplémentée dans ADORecordset_informix72, et ADORecordSet_odbtp.
| ADORecordSet::MoveNext | ( | ) |
Move to next record in the recordset.
Réimplémentée dans ADORecordSet_array, ADORecordSet_db2, ADORecordSet_mysql, ADORecordSet_ext_mysql, ADORecordSet_mysqli, ADORecordSet_mysqlt, ADORecordSet_ext_mysqlt, ADORecordset_oci8, ADORecordset_oci8po, ADORecordSet_odbc, ADORecordSet_postgres64, ADORecordSet_postgres7, et ADORecordSet_assoc_postgres7.
| ADORecordSet::Move | ( | $ | rowNumber = 0 |
) |
Random access to a specific row in the recordset. Some databases do not support access to previous rows in the databases (no scrolling backwards).
| rowNumber | is the row to move to (0-based) |
| ADORecordSet::Fields | ( | $ | colname | ) |
Get the value of a field in the current row by column name. Will not work if ADODB_FETCH_MODE is set to ADODB_FETCH_NUM.
| colname | is the field to access |
Réimplémentée dans ADORecordSet_array, ADORecordSet_ado, ADORecordSet_ado, ADORecordSet_db2, ADORecordset_ibase, ADORecordSet_mysql, ADORecordSet_mysqli, ADORecordset_oci8, ADORecordset_oci8po, ADORecordSet_odbc, ADORecordset_oracle, ADORecordSet_pdo, ADORecordSet_postgres64, et ADORecordset_sqlite.
| ADORecordSet::GetAssocKeys | ( | $ | upper = true |
) |
| & ADORecordSet::GetRowAssoc | ( | $ | upper = 1 |
) |
Use associative array to get fields array for databases that do not support associative arrays. Submitted by Paolo S. Asioli paolo.asioli::libero.it
If you don't want uppercase cols, set $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC before you execute your SQL statement, and access $rs->fields['col'] directly.
$upper 0 = lowercase, 1 = uppercase, 2 = whatever is returned by FetchField
Réimplémentée dans ADORecordSet_mysql, ADORecordSet_mysqli, et ADORecordSet_postgres64.
| ADORecordSet::Close | ( | ) |
Clean up recordset
| ADORecordSet::RecordCount | ( | ) |
synonyms RecordCount and RowCount
| ADORecordSet::MaxRecordCount | ( | ) |
| ADORecordSet::RowCount | ( | ) |
synonyms RecordCount and RowCount
| ADORecordSet::PO_RecordCount | ( | $ | table = "", |
|
| $ | condition = "" | |||
| ) |
Portable RecordCount. Pablo Roca <pabloroca@mvps.org>
| ADORecordSet::CurrentRow | ( | ) |
| ADORecordSet::AbsolutePosition | ( | ) |
synonym for CurrentRow -- for ADO compat
| ADORecordSet::FieldCount | ( | ) |
| & ADORecordSet::FetchField | ( | $ | fieldoffset | ) |
Get the ADOFieldObject of a specific column.
| fieldoffset | is the column position to access(0-based). |
Réimplémentée dans ADORecordSet_array, ADORecordSet_ado, ADORecordSet_ado, ADORecordSet_db2, ADORecordSet_fbsql, ADORecordset_ibase, ADORecordset_informix72, ADORecordSet_mysql, ADORecordSet_mysqli, ADORecordset_oci8, ADORecordSet_odbc, ADORecordSet_odbtp, ADORecordset_oracle, ADORecordSet_pdo, ADORecordSet_postgres64, ADORecordset_sqlite, et ADORecordset_sybase.
| & ADORecordSet::FieldTypesArray | ( | ) |
Get the ADOFieldObjects of all columns in an array.
| & ADORecordSet::FetchObj | ( | ) |
Return the fields array of the current row as an object for convenience. The default case is lowercase field names.
| & ADORecordSet::FetchObject | ( | $ | isupper = true |
) |
Return the fields array of the current row as an object for convenience. The default case is uppercase.
| $isupper | to set the object property names to uppercase |
| & ADORecordSet::FetchNextObj | ( | ) |
Return the fields array of the current row as an object for convenience. The default is lower-case field names.
| & ADORecordSet::FetchNextObject | ( | $ | isupper = true |
) |
Return the fields array of the current row as an object for convenience. The default is upper case field names.
| $isupper | to set the object property names to uppercase |
| ADORecordSet::MetaType | ( | $ | t, | |
| $ | len = -1, |
|||
| $ | fieldobj = false | |||
| ) |
Get the metatype of the column. This is used for formatting. This is because many databases use different names for the same type, so we transform the original type to our standardised version which uses 1 character codes:
| t | is the type passed in. Normally is ADOFieldObject->type. | |
| len | is the maximum length of that field. This is because we treat character fields bigger than a certain size as a 'B' (blob). | |
| fieldobj | is the field object returned by the database driver. Can hold additional info (eg. primary_key for mysql). |
Réimplémentée dans ADORecordSet_ado, ADORecordSet_ado, ADORecordSet_fbsql, ADORecordset_ibase, ADORecordSet_mysql, ADORecordSet_mysqli, ADORecordSet_odbc_db2, et ADORecordSet_postgres64.
| ADORecordSet::_close | ( | ) |
Réimplémentée dans ADORecordSet_array, ADORecordSet_ado, ADORecordSet_ado, ADORecordSet_db2, ADORecordSet_fbsql, ADORecordset_ibase, ADORecordset_informix72, ADORecordSet_ldap, ADORecordSet_mysql, ADORecordSet_mysqli, ADORecordset_oci8, ADORecordSet_odbc, ADORecordSet_odbtp, ADORecordset_oracle, ADORecordSet_pdo, ADORecordSet_postgres64, ADORecordset_sqlite, et ADORecordset_sybase.
| ADORecordSet::AbsolutePage | ( | $ | page = -1 |
) |
set/returns the current recordset page when paginating
| ADORecordSet::AtFirstPage | ( | $ | status = false |
) |
set/returns the status of the atFirstPage flag when paginating
| ADORecordSet::LastPageNo | ( | $ | page = false |
) |
| ADORecordSet::AtLastPage | ( | $ | status = false |
) |
set/returns the status of the atLastPage flag when paginating
| ADORecordSet::$dataProvider = "native" |
Réimplémentée dans ADORecordSet_ado, ADORecordSet_db2, ADORecordSet_odbc, et ADORecordSet_pdo.
| ADORecordSet::$fields = false |
| ADORecordSet::$blobSize = 100 |
holds the current row data
| ADORecordSet::$canSeek = false |
in other words, we use a text area for editing.
any varchar/char field this size or greater is treated as a blob
Réimplémentée dans ADORecordSet_array, ADORecordSet_ado, ADORecordSet_fbsql, ADORecordset_informix72, ADORecordSet_ldap, ADORecordSet_mysql, ADORecordSet_mysqli, ADORecordSet_netezza, ADORecordSet_odbtp, ADORecordSet_postgres64, et ADORecordset_sybase.
| ADORecordSet::$sql |
| ADORecordSet::$EOF = false |
sql text
| ADORecordSet::$emptyTimeStamp = ' ' |
Indicates that the current record position is after the last record in a Recordset object.
| ADORecordSet::$emptyDate = ' ' |
what to display when $time==0
| ADORecordSet::$debug = false |
what to display when $time==0
| ADORecordSet::$timeCreated = 0 |
| ADORecordSet::$bind = false |
datetime in Unix format rs created -- for cached recordsets
Réimplémentée dans ADORecordSet_ado, ADORecordSet_db2, ADORecordset_ibase, ADORecordset_oci8, ADORecordSet_odbc, ADORecordset_oracle, ADORecordSet_pdo, et ADORecordset_sqlite.
| ADORecordSet::$fetchMode |
used by Fields() to hold array - should be private?
| ADORecordSet::$connection = false |
default fetch mode
| ADORecordSet::$_numOfRows = -1 |
the parent connection
| ADORecordSet::$_numOfFields = -1 |
number of rows, or -1
| ADORecordSet::$_queryID = -1 |
number of fields in recordset
| ADORecordSet::$_currentRow = -1 |
This variable keeps the result link identifier.
| ADORecordSet::$_closed = false |
This variable keeps the current row in the Recordset.
| ADORecordSet::$_inited = false |
has recordset been closed
| ADORecordSet::$_obj |
Init() should only be called once
| ADORecordSet::$_names |
Used by FetchObj
| ADORecordSet::$_currentPage = -1 |
Used by FetchObj
| ADORecordSet::$_atFirstPage = false |
Added by Iván Oliva to implement recordset pagination
| ADORecordSet::$_atLastPage = false |
Added by Iván Oliva to implement recordset pagination
| ADORecordSet::$_lastPageNo = -1 |
Added by Iván Oliva to implement recordset pagination
| ADORecordSet::$_maxRecordCount = 0 |
| ADORecordSet::$datetime = false |
1.5.3