当前位置: 首页>>代码示例>>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;未经允许,请勿转载。