Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function rollBack()
 {
     if (!oci_rollback($this->dbh)) {
         throw OCI8Exception::fromErrorInfo($this->errorInfo());
     }
     $this->executeMode = OCI_COMMIT_ON_SUCCESS;
     return true;
 }
 /**
  * {@inheritdoc}
  */
 public function execute($params = null)
 {
     if ($params) {
         $hasZeroIndex = array_key_exists(0, $params);
         foreach ($params as $key => $val) {
             if ($hasZeroIndex && is_numeric($key)) {
                 $this->bindValue($key + 1, $val);
             } else {
                 $this->bindValue($key, $val);
             }
         }
     }
     $ret = @oci_execute($this->_sth, $this->_conn->getExecuteMode());
     if (!$ret) {
         throw OCI8Exception::fromErrorInfo($this->errorInfo());
     }
     return $ret;
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function execute($params = null)
 {
     if ($params) {
         $hasZeroIndex = isset($params[0]);
         foreach ($params as $key => $val) {
             if ($hasZeroIndex && is_numeric($key)) {
                 $this->bindValue($key + 1, $val);
             } else {
                 $this->bindValue($key, $val);
             }
         }
     }
     $ret = @oci_execute($this->_sth, OCI_DEFAULT);
     if (!$ret) {
         throw OCI8Exception::fromErrorInfo($this->errorInfo());
     }
     return $ret;
 }