function query($SQLCmd) { if (!$this->isConnect) { return null; } $cursor = ora_open($this->connection); ora_parse($cursor, $SQLCmd); ora_exec($cursor); $results = array(); $resultName = array(); for ($i = 0; $i < ora_numcols($cursor); $i++) { $resultName[$i] = ora_columnname($cursor, $i); } $cnt = 0; while (ora_fetch($cursor)) { for ($i = 0; $i < ora_numcols($cursor); $i++) { $results[$resultName[$i]][$cnt] = ora_getcolumn($cursor, $i); } $cnt++; } $rs = new ResultSet(); $rs->setHolder($results); ora_close($cursor); return $rs; }
function FetchField($fieldOffset = -1) { $fld = new ADOFieldObject(); $fld->name = ora_columnname($this->_queryID, $fieldOffset); $fld->type = ora_columntype($this->_queryID, $fieldOffset); $fld->max_length = ora_columnsize($this->_queryID, $fieldOffset); return $fld; }