Example #1
0
File: Oci.php Project: hjr3/zf2
 /**
  * Fetches a row from the result set.
  *
  * @param int $style  OPTIONAL Fetch mode for this fetch operation.
  * @param int $cursor OPTIONAL Absolute, relative, or other.
  * @param int $offset OPTIONAL Number for absolute or relative cursors.
  * @return mixed Array, object, or scalar depending on fetch mode.
  * @throws \Zend\DB\Statement\Exception
  */
 public function fetch($style = null, $cursor = null, $offset = null)
 {
     $row = parent::fetch($style, $cursor, $offset);
     $remove = $this->_adapter->foldCase('zend_db_rownum');
     if (is_array($row) && array_key_exists($remove, $row)) {
         unset($row[$remove]);
     }
     return $row;
 }
Example #2
0
 public function create()
 {
     $sql = "SHOW COLUMNS FROM " . $this->table_name() . " WHERE EXTRA NOT LIKE '%auto_increment%'";
     $this->record = $this;
     $this->result = $this->db->fetch($sql);
     for ($i = 0; $i < count($this->result); $i++) {
         $d = (string) $this->result[$i]->Field;
         $this->record->{$d} = null;
     }
     return $this->record;
 }