本文整理汇总了PHP中ocistatementtype函数的典型用法代码示例。如果您正苦于以下问题:PHP ocistatementtype函数的具体用法?PHP ocistatementtype怎么用?PHP ocistatementtype使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ocistatementtype函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exec
/**
* Execute an SQL query
* @param String sql
*/
public function exec($sql)
{
$this->debugInfo($sql);
$stmt = ociparse($this->conn, $sql);
$stmt_type = ocistatementtype($stmt);
if (!ociexecute($stmt)) {
trigger_error($this->lastError(), E_USER_ERROR);
return 0;
}
return 1;
}
示例2: db_exec
function db_exec($qstring,$conn)
{
global $strLastSQL,$dDebug;
if ($dDebug===true)
echo $qstring."<br>";
$strLastSQL=$qstring;
$stmt=ociparse($conn,$qstring);
$stmt_type=ocistatementtype($stmt);
if(!ociexecute($stmt))
{
trigger_error(db_error($conn), E_USER_ERROR);
return 0;
}
else
return 1;
}
示例3: _execute
/**
* Executes given SQL statement. This is an overloaded method.
*
* @param string $sql SQL statement
* @return resource Result resource identifier or null
* @access protected
*/
function _execute($sql)
{
$this->_statementId = @ociparse($this->connection, $sql);
if (!$this->_statementId) {
$this->_setError($this->connection);
return false;
}
if ($this->__transactionStarted) {
$mode = OCI_DEFAULT;
} else {
$mode = OCI_COMMIT_ON_SUCCESS;
}
if (!@ociexecute($this->_statementId, $mode)) {
$this->_setError($this->_statementId);
return false;
}
$this->_setError(null, true);
switch (ocistatementtype($this->_statementId)) {
case 'DESCRIBE':
case 'SELECT':
$this->_scrapeSQL($sql);
break;
default:
return $this->_statementId;
break;
}
if ($this->_limit >= 1) {
ocisetprefetch($this->_statementId, $this->_limit);
} else {
ocisetprefetch($this->_statementId, 3000);
}
$this->_numRows = ocifetchstatement($this->_statementId, $this->_results, $this->_offset, $this->_limit, OCI_NUM | OCI_FETCHSTATEMENT_BY_ROW);
$this->_currentRow = 0;
$this->limit();
return $this->_statementId;
}
示例4: oracle_login
}
$conn = oracle_login($PHPSPLOIT, "POOLED");
if (!$conn) {
$conn = oracle_login($PHPSPLOIT, "DEDICATED");
}
if (!$conn) {
$err = @oci_error();
return error("ERROR: ocilogon(): %s", $err["message"]);
}
// Send query
$query = @ociparse($conn, $PHPSPLOIT['QUERY']);
if (!$query) {
$err = @oci_error();
return error("ERROR: ociparse(): %s", $err["message"]);
}
$statement_type = @ocistatementtype($query);
if (!ociexecute($query)) {
$err = @oci_error($query);
return error("ERROR: ociexecute(): %s", $err["message"]);
}
if ($statement_type == "SELECT") {
$result = array();
$obj = oci_fetch_array($query, OCI_ASSOC + OCI_RETURN_NULLS);
$result[] = array_keys($obj);
$result[] = array_values($obj);
while ($line = oci_fetch_array($query, OCI_ASSOC + OCI_RETURN_NULLS)) {
$result[] = array_values($line);
}
return array('GET', count($result) - 1, $result);
} else {
$rows = @ocirowcount($query);
示例5: ocidefinebyname
ocidefinebyname();
ocierror();
ociexecute();
ocifetch();
ocifetchinto();
ocifetchstatement();
ocifreecollection();
ocifreecursor();
ocifreedesc();
ocifreestatement();
ociinternaldebug();
ociloadlob();
ocilogoff();
ocilogon();
ocinewcollection();
ocinewcursor();
ocinewdescriptor();
ocinlogon();
ocinumcols();
ociparse();
ociplogon();
ociresult();
ocirollback();
ocirowcount();
ocisavelob();
ocisavelobfile();
ociserverversion();
ocisetprefetch();
ocistatementtype();
ociwritelobtofile();
ociwritetemporarylob();