26 #require_once 'Zend/Db/Statement.php'; 66 $this->_lobAsString = (bool) $lob_as_string;
95 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 114 if (
$type === NULL) {
119 if ($length === NULL) {
123 $retval = @oci_bind_by_name($this->_stmt, $parameter,
$variable, $length,
$type);
124 if ($retval ===
false) {
128 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 146 oci_free_statement($this->_stmt);
147 $this->_stmt =
false;
163 return oci_num_fields($this->_stmt);
179 $error = oci_error($this->_stmt);
185 return $error[
'code'];
201 $error = oci_error($this->_stmt);
206 if (isset($error[
'sqltext'])) {
252 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 257 $retval = @oci_execute($this->_stmt, $this->_adapter->_getExecuteMode());
258 if ($retval ===
false) {
262 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 266 $this->_keys = Array();
267 if ($field_num = oci_num_fields($this->_stmt)) {
268 for (
$i = 1;
$i <= $field_num;
$i++) {
269 $name = oci_field_name($this->_stmt,
$i);
270 $this->_keys[] =
$name;
274 $this->_values = Array();
276 $this->_values = array_fill(0, count($this->_keys),
null);
291 public function fetch($style =
null, $cursor =
null, $offset =
null)
297 if ($style ===
null) {
305 $row = oci_fetch_array($this->_stmt, OCI_NUM | OCI_RETURN_NULLS | $lob_as_string);
308 $row = oci_fetch_array($this->_stmt, OCI_ASSOC | OCI_RETURN_NULLS | $lob_as_string);
311 $row = oci_fetch_array($this->_stmt, OCI_BOTH | OCI_RETURN_NULLS | $lob_as_string);
314 $row = oci_fetch_object($this->_stmt);
317 $row = oci_fetch_array($this->_stmt, OCI_BOTH | OCI_RETURN_NULLS | $lob_as_string);
318 if (
$row !==
false) {
326 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 330 'message' =>
"Invalid fetch mode '$style' specified" 336 if (!
$row && $error = oci_error($this->_stmt)) {
340 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 344 if (is_array(
$row) && array_key_exists(
'zend_db_rownum',
$row)) {
345 unset(
$row[
'zend_db_rownum']);
366 if ($style ===
null) {
370 $flags = OCI_FETCHSTATEMENT_BY_ROW;
377 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 381 'message' =>
"OCI8 driver does not support fetchAll(FETCH_BOTH), use fetch() in a loop instead" 397 $flags = $flags &~ OCI_FETCHSTATEMENT_BY_ROW;
398 $flags |= OCI_FETCHSTATEMENT_BY_COLUMN;
405 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 409 'message' =>
"Invalid fetch mode '$style' specified" 416 if ($flags != OCI_FETCHSTATEMENT_BY_ROW) {
417 if (! ($rows = oci_fetch_all($this->_stmt,
$result, 0, -1, $flags) )) {
418 if ($error = oci_error($this->_stmt)) {
422 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 433 if (is_array(
$row) && array_key_exists(
'zend_db_rownum',
$row)) {
434 unset(
$row[
'zend_db_rownum']);
438 while ((
$row = oci_fetch_object($this->_stmt)) !==
false) {
441 if ($error = oci_error($this->_stmt)) {
445 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 467 if (!oci_fetch($this->_stmt)) {
469 if (!$error = oci_error($this->_stmt)) {
475 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 479 $data = oci_result($this->_stmt, $col+1);
480 if (
$data ===
false) {
484 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 513 $obj = oci_fetch_object($this->_stmt);
515 if ($error = oci_error($this->_stmt)) {
519 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 541 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; 545 'message' =>
'Optional feature not implemented' 564 $num_rows = oci_num_rows($this->_stmt);
566 if ($num_rows ===
false) {
570 #require_once 'Zend/Db/Statement/Oracle/Exception.php'; fetchObject($class='stdClass', array $config=array())
bindParam($parameter, &$variable, $type=null, $length=null, $options=null)
$_option $_optionId $class
_bindParam($parameter, &$variable, $type=null, $length=null, $options=null)
fetchAll($style=null, $col=0)
_execute(array $params=null)
setLobAsString($lob_as_string)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
if(!isset($_GET['name'])) $name
fetch($style=null, $cursor=null, $offset=null)