

Public Member Functions | |
| 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=-1) |
| & | 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) | |
Public Attributes | |
| $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 | |
Definition at line 2714 of file adodb.inc.php.
| ADORecordSet::ADORecordSet | ( | $ | queryID | ) |
Constructor
| queryID | this is the queryID returned by ADOConnection->_query() |
Definition at line 2759 of file adodb.inc.php.
| 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. |
Definition at line 2807 of file adodb.inc.php.
| 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.
Definition at line 2825 of file adodb.inc.php.
| & ADORecordSet::GetArray | ( | $ | nRows = -1 |
) |
return recordset as a 2-dimensional array.
| [nRows] | is the number of rows to return. -1 means every row. |
Reimplemented in ADORecordSet_array.
Definition at line 2850 of file adodb.inc.php.
| & 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 |
Reimplemented in ADORecordSet_db2, ADORecordset_oci8, ADORecordset_oci8po, and ADORecordSet_odbc.
Definition at line 2890 of file adodb.inc.php.
| & ADORecordSet::GetRows | ( | $ | nRows = -1 |
) |
Synonym for GetArray() for compatibility with ADO.
| [nRows] | is the number of rows to return. -1 means every row. |
Definition at line 2917 of file adodb.inc.php.
| & ADORecordSet::GetAssoc | ( | $ | force_array = false, |
|
| $ | first2cols = false | |||
| ) |
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 |
Reimplemented in ADORecordSet_ldap.
Definition at line 2939 of file adodb.inc.php.
| 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() |
Definition at line 3042 of file adodb.inc.php.
| 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() |
Definition at line 3059 of file adodb.inc.php.
| ADORecordSet::UnixDate | ( | $ | v | ) |
| $v | is a date string in YYYY-MM-DD format |
Reimplemented in ADORecordset_sybase, and ADORecordSet_array_sybase.
Definition at line 3076 of file adodb.inc.php.
| ADORecordSet::UnixTimeStamp | ( | $ | v | ) |
| $v | is a timestamp string in YYYY-MM-DD HH-NN-SS format |
Reimplemented in ADORecordset_sybase, and ADORecordSet_array_sybase.
Definition at line 3087 of file adodb.inc.php.
| ADORecordSet::Free | ( | ) |
PEAR DB Compat - do not use internally
Definition at line 3096 of file adodb.inc.php.
| ADORecordSet::NumRows | ( | ) |
PEAR DB compat, number of rows
Definition at line 3105 of file adodb.inc.php.
| ADORecordSet::NumCols | ( | ) |
PEAR DB compat, number of cols
Definition at line 3114 of file adodb.inc.php.
| & ADORecordSet::FetchRow | ( | ) |
Fetch a row, returning false if no more rows. This is PEAR DB compat mode.
Definition at line 3125 of file adodb.inc.php.
| ADORecordSet::FetchInto | ( | &$ | arr | ) |
Fetch a row, returning PEAR_Error if no more rows. This is PEAR DB compat mode.
Definition at line 3144 of file adodb.inc.php.
| ADORecordSet::MoveFirst | ( | ) |
Move to the first row in the recordset. Many databases do NOT support this.
Reimplemented in ADORecordset_informix72, and ADORecordSet_odbtp.
Definition at line 3158 of file adodb.inc.php.
| ADORecordSet::MoveLast | ( | ) |
Move to the last row in the recordset.
Reimplemented in ADORecordset_informix72, and ADORecordSet_odbtp.
Definition at line 3170 of file adodb.inc.php.
| ADORecordSet::MoveNext | ( | ) |
Move to next record in the recordset.
Reimplemented in 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, and ADORecordSet_assoc_postgres7.
Definition at line 3189 of file adodb.inc.php.
| 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) |
Definition at line 3215 of file adodb.inc.php.
| 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 |
Reimplemented in 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, and ADORecordset_sqlite.
Definition at line 3265 of file adodb.inc.php.
| & 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
Reimplemented in ADORecordSet_mysql, ADORecordSet_mysqli, and ADORecordSet_postgres64.
Definition at line 3289 of file adodb.inc.php.
| ADORecordSet::Close | ( | ) |
| ADORecordSet::RecordCount | ( | ) |
synonyms RecordCount and RowCount
Definition at line 3328 of file adodb.inc.php.
| ADORecordSet::RowCount | ( | ) |
synonyms RecordCount and RowCount
Definition at line 3345 of file adodb.inc.php.
| ADORecordSet::PO_RecordCount | ( | $ | table = "", |
|
| $ | condition = "" | |||
| ) |
Portable RecordCount. Pablo Roca <pabloroca@mvps.org>
Definition at line 3356 of file adodb.inc.php.
| ADORecordSet::CurrentRow | ( | ) |
Definition at line 3374 of file adodb.inc.php.
| ADORecordSet::AbsolutePosition | ( | ) |
synonym for CurrentRow -- for ADO compat
Definition at line 3381 of file adodb.inc.php.
| ADORecordSet::FieldCount | ( | ) |
Definition at line 3387 of file adodb.inc.php.
| & ADORecordSet::FetchField | ( | $ | fieldoffset = -1 |
) |
Get the ADOFieldObject of a specific column.
| fieldoffset | is the column position to access(0-based). |
Reimplemented in 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, and ADORecordset_sybase.
Definition at line 3397 of file adodb.inc.php.
| & ADORecordSet::FieldTypesArray | ( | ) |
Get the ADOFieldObjects of all columns in an array.
Definition at line 3409 of file adodb.inc.php.
| & ADORecordSet::FetchObj | ( | ) |
Return the fields array of the current row as an object for convenience. The default case is lowercase field names.
Definition at line 3423 of file adodb.inc.php.
| & 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 |
Definition at line 3437 of file adodb.inc.php.
| & ADORecordSet::FetchNextObj | ( | ) |
Return the fields array of the current row as an object for convenience. The default is lower-case field names.
Definition at line 3470 of file adodb.inc.php.
| & 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 |
Definition at line 3488 of file adodb.inc.php.
| 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). |
Reimplemented in ADORecordSet_ado, ADORecordSet_ado, ADORecordSet_fbsql, ADORecordset_ibase, ADORecordSet_mysql, ADORecordSet_mysqli, ADORecordSet_odbc_db2, and ADORecordSet_postgres64.
Definition at line 3524 of file adodb.inc.php.
| ADORecordSet::AbsolutePage | ( | $ | page = -1 |
) |
set/returns the current recordset page when paginating
Definition at line 3676 of file adodb.inc.php.
| ADORecordSet::AtFirstPage | ( | $ | status = false |
) |
set/returns the status of the atFirstPage flag when paginating
Definition at line 3685 of file adodb.inc.php.
| ADORecordSet::AtLastPage | ( | $ | status = false |
) |
set/returns the status of the atLastPage flag when paginating
Definition at line 3700 of file adodb.inc.php.
| 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
Reimplemented in ADORecordSet_array, ADORecordSet_ado, ADORecordSet_fbsql, ADORecordset_informix72, ADORecordSet_ldap, ADORecordSet_mysql, ADORecordSet_mysqli, ADORecordSet_netezza, ADORecordSet_odbtp, ADORecordSet_postgres64, and ADORecordset_sybase.
Definition at line 2722 of file adodb.inc.php.
| ADORecordSet::$_numOfFields = -1 |
number of rows, or -1
Definition at line 2738 of file adodb.inc.php.
| ADORecordSet::$_queryID = -1 |
number of fields in recordset
Definition at line 2739 of file adodb.inc.php.
| ADORecordSet::$_currentRow = -1 |
This variable keeps the result link identifier.
Definition at line 2740 of file adodb.inc.php.
| ADORecordSet::$_closed = false |
This variable keeps the current row in the Recordset.
Definition at line 2741 of file adodb.inc.php.
| ADORecordSet::$_inited = false |
has recordset been closed
Definition at line 2742 of file adodb.inc.php.
| ADORecordSet::$_obj |
Init() should only be called once
Definition at line 2743 of file adodb.inc.php.
| ADORecordSet::$_names |
Used by FetchObj
Definition at line 2744 of file adodb.inc.php.
| ADORecordSet::$_currentPage = -1 |
Used by FetchObj
Definition at line 2746 of file adodb.inc.php.
| ADORecordSet::$_atFirstPage = false |
Added by Iván Oliva to implement recordset pagination
Definition at line 2747 of file adodb.inc.php.
| ADORecordSet::$_atLastPage = false |
Added by Iván Oliva to implement recordset pagination
Definition at line 2748 of file adodb.inc.php.
| ADORecordSet::$_lastPageNo = -1 |
Added by Iván Oliva to implement recordset pagination
Definition at line 2749 of file adodb.inc.php.