function fields($colname) { if ($this->fetchMode & ADODB_FETCH_ASSOC) { return $this->fields[$colname]; } if (!$this->bind) { $this->bind = array(); for ($i = 0; $i < $this->_numOfFields; $i++) { $name = @odbtp_field_name($this->_queryID, $i); $this->bind[strtoupper($name)] = $i; } } return $this->fields[$this->bind[strtoupper($colname)]]; }
function &FetchField($fieldOffset = 0) { $off = $fieldOffset; // offsets begin at 0 $o = new ADOFieldObject(); $o->name = odbtp_field_name($this->_queryID, $off); $o->type = odbtp_field_type($this->_queryID, $off); strstr(PHP_OS, "WIN") ? $o->max_length = odbtp_field_length($this->_queryID, $off) : ($o->max_length = 'unknown'); if (ADODB_ASSOC_CASE == 0) { $o->name = strtolower($o->name); } else { if (ADODB_ASSOC_CASE == 1) { $o->name = strtoupper($o->name); } } return $o; }