當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ADODB_oci8類代碼示例

本文整理匯總了PHP中ADODB_oci8的典型用法代碼示例。如果您正苦於以下問題:PHP ADODB_oci8類的具體用法?PHP ADODB_oci8怎麽用?PHP ADODB_oci8使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ADODB_oci8類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _query

 function _query($sql, $inputarr = false)
 {
     if (is_array($inputarr)) {
         $i = 0;
         if (is_array($sql)) {
             foreach ($inputarr as $v) {
                 $arr['bind' . $i++] = $v;
             }
         } else {
             // Need to identify if the ? is inside a quoted string, and if
             // so not use it as a bind variable
             preg_match_all('/".*\\??"|\'.*\\?.*?\'/', $sql, $matches);
             foreach ($matches[0] as $qmMatch) {
                 $qmReplace = str_replace('?', '-QUESTIONMARK-', $qmMatch);
                 $sql = str_replace($qmMatch, $qmReplace, $sql);
             }
             $sqlarr = explode('?', $sql);
             $sql = $sqlarr[0];
             foreach ($inputarr as $k => $v) {
                 $sql .= ":{$k}" . $sqlarr[++$i];
             }
             $sql = str_replace('-QUESTIONMARK-', '?', $sql);
         }
     }
     return ADODB_oci8::_query($sql, $inputarr);
 }
開發者ID:nicolas34732,項目名稱:address_book,代碼行數:26,代碼來源:adodb-oci8po.inc.php

示例2: _query

 function _query($sql, $inputarr = false)
 {
     if (is_array($inputarr)) {
         $i = 0;
         if (is_array($sql)) {
             foreach ($inputarr as $v) {
                 $arr['bind' . $i++] = $v;
             }
         } else {
             $sqlarr = explode('?', $sql);
             $sql = $sqlarr[0];
             foreach ($inputarr as $k => $v) {
                 $sql .= ":{$k}" . $sqlarr[++$i];
             }
         }
     }
     return ADODB_oci8::_query($sql, $inputarr);
 }
開發者ID:mvpphet,項目名稱:IntranetPaper,代碼行數:18,代碼來源:adodb-oci8po.inc.php

示例3: _query

 function _query($sql, $inputarr)
 {
     if (is_array($inputarr)) {
         $i = 0;
         $sqlarr = explode('?', $sql);
         $sql = $sqlarr[0];
         foreach ($inputarr as $v) {
             $name = 'bind' . $i++;
             $arr[$name] = $v;
             $sql .= ":{$name}" . $sqlarr[$i];
         }
         //print $sql;
         //print_r($arr);
     } else {
         $arr = false;
     }
     return ADODB_oci8::_query($sql, $arr);
 }
開發者ID:qoire,項目名稱:portal,代碼行數:18,代碼來源:adodb-oci8po.inc.php

示例4: _query

 function _query($sql, $inputarr)
 {
     if (is_array($inputarr)) {
         $i = 0;
         if (is_array($sql)) {
             foreach ($inputarr as $v) {
                 $arr['bind' . $i++] = $v;
             }
         } else {
             /* PSU mod.  DO NOT use ? syntax for bind variables...this breaks our world 
             			   and binding on question marks assumes ALL question marks are bind variables...
             			$sqlarr = explode('?',$sql);
             			$sql = $sqlarr[0];
             			foreach($inputarr as $k => $v) {
             				$sql .=  ":$k" . $sqlarr[++$i];
             			}
             			*/
         }
     }
     return ADODB_oci8::_query($sql, $inputarr);
 }
開發者ID:AholibamaSI,項目名稱:plymouth-webapp,代碼行數:21,代碼來源:adodb-oci8po.inc.php

示例5: ExecuteCursor

	function ExecuteCursor($sql,$cursorName='rs',$params=false)
	{
		if (is_array($sql)) $stmt = $sql;
		else $stmt = ADODB_oci8::Prepare($sql,true); # true to allocate OCINewCursor

		if (is_array($stmt) && sizeof($stmt) >= 5) {
			$hasref = true;
			$ignoreCur = false;
			$this->Parameter($stmt, $ignoreCur, $cursorName, false, -1, OCI_B_CURSOR);
			if ($params) {
				foreach($params as $k => $v) {
					$this->Parameter($stmt,$params[$k], $k);
				}
			}
		} else
			$hasref = false;

		$rs = $this->Execute($stmt);
		if ($rs) {
			if ($rs->databaseType == 'array') OCIFreeCursor($stmt[4]);
			elseif ($hasref) $rs->_refcursor = $stmt[4];
		}
		return $rs;
	}
開發者ID:BackupTheBerlios,項目名稱:oos-svn,代碼行數:24,代碼來源:adodb-oci8.old.inc.php

示例6: foreach

 function &ExecuteCursor($sql, $cursorName = 'rs', $params = false)
 {
     $stmt = ADODB_oci8::Prepare($sql, true);
     # true to allocate OCINewCursor
     if (is_array($stmt) && sizeof($stmt) >= 5) {
         $this->Parameter($stmt, $ignoreCur, $cursorName, false, -1, OCI_B_CURSOR);
         if ($params) {
             foreach ($params as $k => $v) {
                 $this->Parameter($stmt, $params[$k], $k);
             }
         }
     }
     return $this->Execute($stmt);
 }
開發者ID:BackupTheBerlios,項目名稱:facturaphp-svn,代碼行數:14,代碼來源:adodb-oci8.inc.php

示例7: reset

 function &ExecuteCursor($sql, $cursorName = 'rs', $params = false)
 {
     $stmt = ADODB_oci8::Prepare($sql);
     if (is_array($stmt) && sizeof($stmt) >= 5) {
         $this->Parameter($stmt, $ignoreCur, $cursorName, false, -1, OCI_B_CURSOR);
         if ($params) {
             reset($params);
             while (list($k, $v) = each($params)) {
                 $this->Parameter($stmt, $params[$k], $k);
             }
         }
     }
     return $this->Execute($stmt);
 }
開發者ID:cbsistem,項目名稱:bansos-dev,代碼行數:14,代碼來源:adodb-oci8.inc.php

示例8: foreach

 function &ExecuteServicior($sql, $serviciorName = 'rs', $params = false)
 {
     if (is_array($sql)) {
         $stmt = $sql;
     } else {
         $stmt = ADODB_oci8::Prepare($sql, true);
     }
     # true to allocate OCINewServicior
     if (is_array($stmt) && sizeof($stmt) >= 5) {
         $hasref = true;
         $this->Parameter($stmt, $ignoreCur, $serviciorName, false, -1, OCI_B_SERVICIOR);
         if ($params) {
             foreach ($params as $k => $v) {
                 $this->Parameter($stmt, $params[$k], $k);
             }
         }
     } else {
         $hasref = false;
     }
     $rs =& $this->Execute($stmt);
     if ($rs) {
         if ($rs->databaseType == 'array') {
             OCIFreeServicior($stmt[4]);
         } else {
             if ($hasref) {
                 $rs->_refservicior = $stmt[4];
             }
         }
     }
     return $rs;
 }
開發者ID:pablius,項目名稱:oob-n1,代碼行數:31,代碼來源:adodb-oci8.inc.php

示例9:

 function &ExecuteCursor($sql, $cursorName = 'rs')
 {
     $stmt = ADODB_oci8::Prepare($sql);
     if (is_array($stmt) && sizeof($stmt) >= 5) {
         $this->Parameter($stmt, $ignoreCur, $cursorName, false, -1, OCI_B_CURSOR);
     }
     return $this->Execute($stmt);
 }
開發者ID:OberjukhtinIA0VWV0Allokuum,項目名稱:testmasteke.leo,代碼行數:8,代碼來源:adodb-oci8.inc.php

示例10: UpdateBlobFile

 /**
  * Usage:  store file pointed to by $var in a blob
  */
 function UpdateBlobFile($table, $column, $val, $where, $blobtype = 'BLOB')
 {
     switch (strtoupper($blobtype)) {
         default:
             print "<b>UpdateBlob</b>: Unknown blobtype={$blobtype}<br>";
             return false;
         case 'BLOB':
             $type = OCI_B_BLOB;
             break;
         case 'CLOB':
             $type = OCI_B_CLOB;
             break;
     }
     if ($this->databaseType == 'oci8po') {
         $sql = "UPDATE {$table} set {$column}=EMPTY_{$blobtype}() WHERE {$where} RETURNING {$column} INTO ?";
     } else {
         $sql = "UPDATE {$table} set {$column}=EMPTY_{$blobtype}() WHERE {$where} RETURNING {$column} INTO :blob";
     }
     $desc = OCINewDescriptor($this->_connectionID, OCI_D_LOB);
     $arr['blob'] = array($desc, -1, $type);
     $this->BeginTrans();
     $rs = ADODB_oci8::Execute($sql, $arr);
     $rez = !empty($rs);
     $desc->savefile($val);
     $desc->free();
     $this->CommitTrans();
     if ($rez) {
         $rs->Close();
     }
     return $rez;
 }
開發者ID:qoire,項目名稱:portal,代碼行數:34,代碼來源:adodb-oci8.inc.php

示例11:

 function __construct()
 {
     parent::__construct();
 }
開發者ID:ARDivekar,項目名稱:Sponsorship_Management,代碼行數:4,代碼來源:adodb-oci805.inc.php


注:本文中的ADODB_oci8類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。