類別ADORecordSet_array的繼承圖:

公開方法(Public Methods) | |
| ADORecordSet_array ($fakeid=1) | |
| InitArray ($array, $typearr, $colnames=false) | |
| InitArrayFields (&$array, &$fieldarr) | |
| & | GetArray ($nRows=-1) |
| _initrs () | |
| Fields ($colname) | |
| & | FetchField ($fieldOffset=-1) |
| _seek ($row) | |
| MoveNext () | |
| _fetch () | |
| _close () | |
公開屬性 | |
| $databaseType = 'array' | |
| $_array | |
| $_types | |
| $_colnames | |
| $_skiprow1 | |
| $_fieldarr | |
| $canSeek = true | |
| $affectedrows = false | |
| $insertid = false | |
| $sql = '' | |
| indicates that seek is supported | |
| $compat = false | |
Note that the constructor is different from the standard ADORecordSet
定義在 adodb.inc.php 檔案之第 3426 行.
|
|
Constructor 定義在 adodb.inc.php 檔案之第 3444 行. 參考 ADORecordSet::ADORecordSet(). 被參考於 ADORecordSet_array_sybase::ADORecordSet_array_sybase(). 03445 { 03446 global $ADODB_FETCH_MODE,$ADODB_COMPAT_FETCH; 03447 03448 // fetch() on EOF does not delete $this->fields 03449 $this->compat = !empty($ADODB_COMPAT_FETCH); 03450 $this->ADORecordSet($fakeid); // fake queryID 03451 $this->fetchMode = $ADODB_FETCH_MODE; 03452 }
|
|
|
依據ADORecordSet重新實作. 定義在 adodb.inc.php 檔案之第 3592 行.
|
|
|
定義在 adodb.inc.php 檔案之第 3579 行. 03580 { 03581 $pos = $this->_currentRow; 03582 03583 if ($this->_numOfRows <= $pos) { 03584 if (!$this->compat) $this->fields = false; 03585 return false; 03586 } 03587 if ($this->_skiprow1) $pos += 1; 03588 $this->fields = $this->_array[$pos]; 03589 return true; 03590 }
|
|
|
定義在 adodb.inc.php 檔案之第 3507 行. 03508 { 03509 $this->_numOfRows = sizeof($this->_array); 03510 if ($this->_skiprow1) $this->_numOfRows -= 1; 03511 03512 $this->_numOfFields =(isset($this->_fieldobjects)) ? 03513 sizeof($this->_fieldobjects):sizeof($this->_types); 03514 }
|
|
|
定義在 adodb.inc.php 檔案之第 3548 行. 03549 { 03550 if (sizeof($this->_array) && 0 <= $row && $row < $this->_numOfRows) { 03551 $this->_currentRow = $row; 03552 if ($this->_skiprow1) $row += 1; 03553 $this->fields = $this->_array[$row]; 03554 return true; 03555 } 03556 return false; 03557 }
|
|
|
Get the ADOFieldObject of a specific column.
依據ADORecordSet重新實作. 定義在 adodb.inc.php 檔案之第 3535 行. 被參考於 Fields(). 03536 { 03537 if (isset($this->_fieldobjects)) { 03538 return $this->_fieldobjects[$fieldOffset]; 03539 } 03540 $o = new ADOFieldObject(); 03541 $o->name = $this->_colnames[$fieldOffset]; 03542 $o->type = $this->_types[$fieldOffset]; 03543 $o->max_length = -1; // length not known 03544 03545 return $o; 03546 }
|
|
|
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.
依據ADORecordSet重新實作. 定義在 adodb.inc.php 檔案之第 3517 行. 參考 $mode, 及 FetchField(). 03518 { 03519 $mode = isset($this->adodbFetchMode) ? $this->adodbFetchMode : $this->fetchMode; 03520 03521 if ($mode & ADODB_FETCH_ASSOC) { 03522 if (!isset($this->fields[$colname])) $colname = strtolower($colname); 03523 return $this->fields[$colname]; 03524 } 03525 if (!$this->bind) { 03526 $this->bind = array(); 03527 for ($i=0; $i < $this->_numOfFields; $i++) { 03528 $o = $this->FetchField($i); 03529 $this->bind[strtoupper($o->name)] = $i; 03530 } 03531 } 03532 return $this->fields[$this->bind[strtoupper($colname)]]; 03533 }
|
|
|
return recordset as a 2-dimensional array.
依據ADORecordSet重新實作. 定義在 adodb.inc.php 檔案之第 3497 行. 參考 $arr, 及 ADORecordSet::GetArray(). 03498 { 03499 if ($nRows == -1 && $this->_currentRow <= 0 && !$this->_skiprow1) { 03500 return $this->_array; 03501 } else { 03502 $arr =& ADORecordSet::GetArray($nRows); 03503 return $arr; 03504 } 03505 }
|
|
||||||||||||||||
|
Setup the array.
定義在 adodb.inc.php 檔案之第 3466 行. 參考 $array, $typearr, 及 ADORecordSet::Init(). 03467 { 03468 $this->_array = $array; 03469 $this->_types = $typearr; 03470 if ($colnames) { 03471 $this->_skiprow1 = false; 03472 $this->_colnames = $colnames; 03473 } else { 03474 $this->_skiprow1 = true; 03475 $this->_colnames = $array[0]; 03476 } 03477 $this->Init(); 03478 }
|
|
||||||||||||
|
Setup the Array and datatype file objects
定義在 adodb.inc.php 檔案之第 3487 行. 參考 $array, 及 ADORecordSet::Init(). 03488 { 03489 $this->_array =& $array; 03490 $this->_skiprow1= false; 03491 if ($fieldarr) { 03492 $this->_fieldobjects =& $fieldarr; 03493 } 03494 $this->Init(); 03495 }
|
|
|
Move to next record in the recordset.
依據ADORecordSet重新實作. 定義在 adodb.inc.php 檔案之第 3559 行. 03560 { 03561 if (!$this->EOF) { 03562 $this->_currentRow++; 03563 03564 $pos = $this->_currentRow; 03565 03566 if ($this->_numOfRows <= $pos) { 03567 if (!$this->compat) $this->fields = false; 03568 } else { 03569 if ($this->_skiprow1) $pos += 1; 03570 $this->fields = $this->_array[$pos]; 03571 return true; 03572 } 03573 $this->EOF = true; 03574 } 03575 03576 return false; 03577 }
|
|
|
定義在 adodb.inc.php 檔案之第 3430 行. |
|
|
定義在 adodb.inc.php 檔案之第 3432 行. |
|
|
定義在 adodb.inc.php 檔案之第 3434 行. |
|
|
定義在 adodb.inc.php 檔案之第 3433 行. |
|
|
定義在 adodb.inc.php 檔案之第 3431 行. |
|
|
定義在 adodb.inc.php 檔案之第 3436 行. |
|
|
any varchar/char field this size or greater is treated as a blob in other words, we use a text area for editing. 依據ADORecordSet重新實作. 定義在 adodb.inc.php 檔案之第 3435 行. |
|
|
定義在 adodb.inc.php 檔案之第 3439 行. |
|
|
定義在 adodb.inc.php 檔案之第 3428 行. |
|
|
定義在 adodb.inc.php 檔案之第 3437 行. |
|
|
indicates that seek is supported
依據ADORecordSet重新實作. 定義在 adodb.inc.php 檔案之第 3438 行. |