本文整理汇总了PHP中OCILogOff函数的典型用法代码示例。如果您正苦于以下问题:PHP OCILogOff函数的具体用法?PHP OCILogOff怎么用?PHP OCILogOff使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OCILogOff函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Close
function Close()
{
if ($this->connection != 0) {
OCILogOff($this->connection);
$this->connection = 0;
$this->affected_rows = -1;
$this->uncommitedqueries = 0;
}
}
示例2: OCIResult
echo "<tr>";
echo "<td>Year</td>";
$fg5 = OCIResult($stmt, "YEAR");
echo "<td>";
echo $fg5;
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Price</td>";
$fg6 = OCIResult($stmt, "PRICE");
echo "<td>";
echo $fg6;
echo "</td>";
echo "</tr>";
}
OCILogOff($connect);
}
?>
</table>
<script type="text/javascript">
$(document).ready(function () {
$('.slideout-menu-toggle').on('click', function(event){
event.preventDefault();
// create menu variables
var slideoutMenu = $('.slideout-menu');
var slideoutMenuWidth = $('.slideout-menu').width();
// toggle open class
slideoutMenu.toggleClass("open");
// slide menu
示例3: dbi_close
/**
* Closes a database connection.
*
* This is not necessary for any database that uses pooled connections such as
* MySQL, but a good programming practice.
*
* @param resource $conn The database connection
*
* @return bool True on success, false on error
*/
function dbi_close($conn)
{
if (strcmp($GLOBALS["db_type"], "mysql") == 0) {
return mysql_close($conn);
} else {
if (strcmp($GLOBALS["db_type"], "mysqli") == 0) {
return mysqli_close($conn);
} else {
if (strcmp($GLOBALS["db_type"], "mssql") == 0) {
return mssql_close($conn);
} else {
if (strcmp($GLOBALS["db_type"], "oracle") == 0) {
return OCILogOff($conn);
} else {
if (strcmp($GLOBALS["db_type"], "postgresql") == 0) {
return pg_close($GLOBALS["postgresql_connection"]);
} else {
if (strcmp($GLOBALS["db_type"], "odbc") == 0) {
return odbc_close($GLOBALS["odbc_connection"]);
} else {
if (strcmp($GLOBALS["db_type"], "ibm_db2") == 0) {
return db2_close($GLOBALS["ibm_db2_connection"]);
} else {
if (strcmp($GLOBALS["db_type"], "ibase") == 0) {
return ibase_close($conn);
} else {
dbi_fatal_error("dbi_close(): db_type not defined.");
}
}
}
}
}
}
}
}
}
示例4: disconnect
/**
* Disconnects from the database server
*
* @return bool TRUE on success, FALSE on failure
*/
function disconnect()
{
if (function_exists('oci_close')) {
$ret = @oci_close($this->connection);
} else {
$ret = @OCILogOff($this->connection);
}
$this->connection = null;
return $ret;
}
示例5: oci_connect
*/
$dbconn = oci_connect('ndjsb', 'dmndjsb', "(DEscriptION=(ADDRESS=(PROTOCOL =TCP)(HOST=172.24.132.14)(PORT = 1530))(CONNECT_DATA=(SID=jsbdb)))");
//$dbconn=oci_connect('ndjsb','dmndjsb',"//172.24.132.14:1530/jsbdb");
if ($dbconn != false) {
echo "连接成功";
$sql = "INSERT INTO splunk_mroom_rtt (CLIENT_REGION, SEND_HOST, AVG_RTT, STDEV_RTT, NUMS, MRTT, MAX_RTT, P25, P75, P95, P99, IQR, REP_DATE) VALUES ('aaa', '115.231.160.100', '0.2', '0.033587', '6', '0.033698000', '0.084954000', '0.011849000', '0.072645000', '0.084954000', '0.084954000', '0.060796000', to_date('2015-05-25','YYYY-MM-DD'))";
insert_data($dbconn, $sql);
commit($dbconn);
exit;
/* $sql = "insert into splunk_mroom_rtt (REP_DATE,CLIENT_REGION,SEND_HOST,AVG_RTT)
values(to_date('2015-01-01','YYYY-MM-DD'),'aa','115.231.160.100','0.03554113')";
insert_data($dbconn, $sql);
commit($dbconn);*/
$sql = "select to_char(REP_DATE, 'YYYY-MM-DD HH24:MI:SS') as REP_DATE,CLIENT_REGION,SEND_HOST,AVG_RTT,STDEV_RTT,NUMS,MRTT,MAX_RTT,P25,P75,P95,P99,IQR from splunk_mroom_rtt";
select_data($dbconn, $sql);
if (OCILogOff($dbconn) == true) {
echo "关闭连接成功!";
//=这里有问题
}
} else {
echo "连接失败";
}
exit;
function select_data($conn, $sql)
{
$stid = oci_parse($conn, $sql);
oci_execute($stid);
while ($row = oci_fetch_array($stid, OCI_BOTH)) {
var_dump($row);
// Use the uppercase column names for the associative array indices
// echo $row[0] . " and " . $row['REP_DATE'] . " are the same<br>\n";
示例6: disconnect
/**
* Log out and disconnect from the database.
*
* @return bool true on success, false if not connected.
*/
function disconnect()
{
$ret = @OCILogOff($this->connection);
$this->connection = null;
return $ret;
}
示例7:
/**
* execute a query as DBA
*
* @param string $query the SQL query
* @param mixed $types array that contains the types of the columns in
* the result set
* @param boolean $is_manip if the query is a manipulation query
* @return mixed MDB2_OK on success, a MDB2 error on failure
* @access public
*/
function &standaloneQuery($query, $types = null, $is_manip = false)
{
$connection = $this->_doConnect($this->options['DBA_username'], $this->options['DBA_password'], $this->options['persistent']);
if (PEAR::isError($connection)) {
return $connection;
}
$offset = $this->offset;
$limit = $this->limit;
$this->offset = $this->limit = 0;
$query = $this->_modifyQuery($query, $is_manip, $limit, $offset);
$result =& $this->_doQuery($query, $is_manip, $connection, false);
@OCILogOff($connection);
if (PEAR::isError($result)) {
return $result;
}
if ($is_manip) {
$affected_rows = $this->_affectedRows($connection, $result);
return $affected_rows;
}
$return =& $this->_wrapResult($result, $types, true, false, $limit, $offset);
return $return;
}
示例8: db_disconnect
function db_disconnect($cid = -1)
{
global $db_type;
global $debug;
global $_connect_id;
if ($cid == -1) {
$cid = $_connect_id;
}
if ($db_type == "mysql") {
return mysql_close($cid);
} else {
if ($db_type == "oracle") {
return OCILogOff($cid);
}
}
}
示例9: standaloneQuery
/**
* execute a query as DBA
*
* @param string $query the SQL query
* @return mixed MDB2_OK on success, a MDB2 error on failure
* @access public
*/
function standaloneQuery($query)
{
$connection = $this->_doConnect($this->options['DBA_username'], $this->options['DBA_password'], $this->options['persistent']);
if (MDB2::isError($connection)) {
return $connection;
}
$result = @OCIParse($connection, $query);
if (!$result) {
return $this->raiseError($connection);
}
if ($this->auto_commit) {
$success = @OCIExecute($result, OCI_COMMIT_ON_SUCCESS);
} else {
$success = @OCIExecute($result, OCI_DEFAULT);
}
if (!$success) {
return $this->raiseError($result);
}
@OCILogOff($connection);
return MDB2_OK;
}
示例10: standaloneQuery
/**
* execute a query as DBA
*
* @param string $query the SQL query
* @param mixed $types array containing the types of the columns in
* the result set
* @param boolean $is_manip if the query is a manipulation query
* @return mixed MDB2_OK on success, a MDB2 error on failure
* @access public
*/
function standaloneQuery($query, $types = null, $is_manip = false)
{
$user = $this->options['DBA_username'] ? $this->options['DBA_username'] : $this->dsn['username'];
$pass = $this->options['DBA_password'] ? $this->options['DBA_password'] : $this->dsn['password'];
$connection = $this->_doConnect($user, $pass, $this->options['persistent']);
if (PEAR::isError($connection)) {
return $connection;
}
$offset = $this->offset;
$limit = $this->limit;
$this->offset = $this->limit = 0;
$query = $this->_modifyQuery($query, $is_manip, $limit, $offset);
$result = $this->_doQuery($query, $is_manip, $connection, false);
if (!PEAR::isError($result)) {
if ($is_manip) {
$result = $this->_affectedRows($connection, $result);
} else {
$result = $this->_wrapResult($result, $types, true, false, $limit, $offset);
}
}
@OCILogOff($connection);
return $result;
}
示例11: print
// This also includes a link to a details page - Comment Heidi Biggin
// Unfortunately all records in the list go to the same page - Comment Heidi Biggin
// I was unable to work out how to select ONLY the record that had been selected - Comment Heidi Biggin
print( "<li><a href=#pagetwentytwo>" );
// This each individual record into a variable then prints the variable in the list - Comment Heidi Biggin
// This will do this for every record in the database in the table selected - Comment Heidi Biggin
$fg1 = OCIResult($stmt,"REST_NAME");
print( $fg1);
print( "</a></li>" );
}
// Close the database connection - Comment Heidi Biggin
OCILogOff ($db);
?>
<!-- end PHP script - Comment Heidi Biggin-->
</ul>
</div>
</div>
<div data-role="footer">
<h1>SIT313 Mobile Computing</h1>
</div>
</div>
</div>
<!--PAGE FIFTEEN-->
<!--Individual Movie Page-->
示例12: disconnect
function disconnect()
{
return OCILogOff($this->connectionid);
}
示例13: dbi_close
function dbi_close($conn)
{
global $db_connection_info, $db_query_count, $old_textlimit, $old_textsize, $SQLLOG;
if (is_array($db_connection_info)) {
if (!$db_connection_info['connected']) {
// never connected
// echo '<!-- No db connection made (cached) -->' . "\n";
return true;
} else {
$conn = $db_connection_info['connection'];
$db_connection_info['connected'] = false;
$db_connection_info['connection'] = 0;
// echo '<!-- Closing lazy db connection made after '
$db_query_count . " queries -->\n";
}
}
if (strcmp($GLOBALS['db_type'], 'mysql') == 0) {
return mysql_close($conn);
} elseif (strcmp($GLOBALS['db_type'], 'mysqli') == 0) {
return $conn->close();
} elseif (strcmp($GLOBALS['db_type'], 'mssql') == 0) {
if (!empty($old_textlimit)) {
ini_set('mssql.textlimit', $old_textlimit);
ini_set('mssql.textsize', $old_textsize);
}
return mssql_close($conn);
} elseif (strcmp($GLOBALS['db_type'], 'oracle') == 0) {
return OCILogOff($conn);
} elseif (strcmp($GLOBALS['db_type'], 'postgresql') == 0) {
return pg_close($GLOBALS['postgresql_connection']);
} elseif (strcmp($GLOBALS['db_type'], 'odbc') == 0) {
return odbc_close($GLOBALS['odbc_connection']);
} elseif (strcmp($GLOBALS['db_type'], 'ibm_db2') == 0) {
return db2_close($GLOBALS['ibm_db2_connection']);
} elseif (strcmp($GLOBALS['db_type'], 'ibase') == 0) {
return ibase_close($conn);
} elseif (strcmp($GLOBALS['db_type'], 'sqlite') == 0) {
return sqlite_close($conn);
} else {
dbi_fatal_error('dbi_close (): ' . translate('db_type not defined.'));
}
}
示例14: time
$_SESSION['firstname'] = $firstname;
$_SESSION['lastname'] = $lastname;
$_SESSION['postcode'] = $pcode;
$_SESSION['state'] = $state;
$_SESSION['city'] = $city;
$_SESSION['myvar'] = $user;
//$_SESSION['firstname'] = $first;
//if remember checkbox is checked store the cookie for one month
//otherwise store it for two hour
/*
if($remember == "true")
{
setcookie("user", $givenname, time()+60*60*24*30);
setcookie("cid", $cid, time()+60*60*24*30);
}
else
{
setcookie("user", $givenname, time()+3600 *2);
setcookie("cid", $cid, time()+3600 *2);
}
*/
//header('Location:home.php');
print "1";
} else {
echo "\tInvalid password";
}
} else {
echo "\tInvalid username";
}
OCILogOff($conn);