本文整理汇总了PHP中ADODB_oci8::Execute方法的典型用法代码示例。如果您正苦于以下问题:PHP ADODB_oci8::Execute方法的具体用法?PHP ADODB_oci8::Execute怎么用?PHP ADODB_oci8::Execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ADODB_oci8
的用法示例。
在下文中一共展示了ADODB_oci8::Execute方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: UpdateBlobFile
/**
* Usage: store file pointed to by $var in a blob
*/
function UpdateBlobFile($table,$column,$val,$where,$blobtype='BLOB')
{
switch(strtoupper($blobtype)) {
default: ADOConnection::outp( "<b>UpdateBlob</b>: Unknown blobtype=$blobtype"); 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);
if ($rez = !empty($rs)) $desc->savefile($val);
$desc->free();
$this->CommitTrans();
if ($rez) $rs->Close();
return $rez;
}
示例2: 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;
}