本文整理汇总了PHP中oci_close函数的典型用法代码示例。如果您正苦于以下问题:PHP oci_close函数的具体用法?PHP oci_close怎么用?PHP oci_close使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了oci_close函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: has_facturation
/**
* Modify permis's informations
*
* @param PK_FACTURATION, permis's id
* @return 0 without errors, exception message any others cases
*/
public function has_facturation($PK_FACTURATION)
{
try {
$qry = oci_parse($this->db, 'SELECT AUTO.FACTURATION FROM FACTURATION WHERE FACTURATION.PK_FACTURATION =?');
$qry->bindValue(1, $PK_FACTURATION, \PDO::PARAM_STR);
$nrows = oci_fetch_all($qry, $res, null, null, OCI_FETCHSTATEMENT_BY_ROW);
oci_close($this->db);
return $res;
} catch (Exception $e) {
return $e->getMessage();
}
}
示例2: add_marque
/**
* Modify all customer's informations from one customer
* @param TYPE_FACTURE , customer's lasttName
*/
public function add_marque($TYPE_FACTURE)
{
try {
$qry = oci_parse($this->db, 'INSERT INTO AUTO.MARQUE (NOM) VALUES (?)');
$qry->bindValue(1, $TYPE_FACTURE, \PDO::PARAM_STR);
$nrows = oci_fetch_all($qry, $res, null, null, OCI_FETCHSTATEMENT_BY_ROW);
oci_close($this->db);
return $res;
} catch (Exception $e) {
return $e->getMessage();
}
}
示例3: has_Permis
/**
* Modify permis's informations
*
* @param PK_PERMIS, permis's id
* @return 0 without errors, exception message any others cases
*/
public function has_Permis($PK_PERMIS)
{
try {
$qry = oci_parse($this->db, 'SELECT AUTO.PERMIS FROM PERMIS WHERE PERMIS.PK_PERMIS =?');
$qry->bindValue(1, $PK_PERMIS, \PDO::PARAM_STR);
$nrows = oci_fetch_all($qry, $res, null, null, OCI_FETCHSTATEMENT_BY_ROW);
oci_close($this->db);
return $res;
} catch (Exception $e) {
return $e->getMessage();
}
}
示例4: has_marque
/**
* Modify permis's informations
*
* @param PK_LECON, permis's id
* @return 0 without errors, exception message any others cases
*/
public function has_marque($PK_LECON)
{
try {
$qry = oci_parse($this->db, 'SELECT AUTO.EXAMEN FROM EXAMEN WHERE EXAMEN.PK_EXAMEN =?');
$qry->bindValue(1, $PK_LECON, \PDO::PARAM_STR);
$nrows = oci_fetch_all($qry, $res, null, null, OCI_FETCHSTATEMENT_BY_ROW);
oci_close($this->db);
return $res;
} catch (Exception $e) {
return $e->getMessage();
}
}
示例5: has_vehicule
/**
* Modify permis's informations
*
* @param PK_VEHICULE, permis's id
* @return 0 without errors, exception message any others cases
*/
public function has_vehicule($PK_VEHICULE)
{
try {
$qry = oci_parse($this->db, 'SELECT * FROM VEHICULE WHERE VEHICULE.PK_VEHICULE =?');
$qry->bindValue(1, $PK_VEHICULE, \PDO::PARAM_STR);
$nrows = oci_fetch_all($qry, $res, null, null, OCI_FETCHSTATEMENT_BY_ROW);
oci_close($this->db);
return $res;
} catch (Exception $e) {
return $e->getMessage();
}
}
示例6: getById
public function getById($id)
{
$this->conex = DataBase::getInstance();
$stid = oci_parse($this->conex, "SELECT *\n\t\t\tFROM FISC_CIUDADANO WHERE ID_CIUDADANO=:id");
if (!$stid) {
$e = oci_error($this->conex);
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
// Realizar la lógica de la consulta
oci_bind_by_name($stid, ':id', $id);
$r = oci_execute($stid);
if (!$r) {
$e = oci_error($stid);
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
// Obtener los resultados de la consulta
$alm = new FiscCiudadano();
while ($fila = oci_fetch_array($stid, OCI_ASSOC + OCI_RETURN_NULLS)) {
$it = new ArrayIterator($fila);
while ($it->valid()) {
$alm->__SET(strtolower($it->key()), $it->current());
$it->next();
}
}
//Libera los recursos
oci_free_statement($stid);
// Cierra la conexión Oracle
oci_close($this->conex);
//retorna el resultado de la consulta
return $alm;
}
示例7: get_list
function get_list($data)
{
$results = array();
$games = array();
$conn = oci_connect('malz', '1Qaz2wsx', '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(Host=db1.chpc.ndsu.nodak.edu)(Port=1521)))(CONNECT_DATA=(SID=cs)))');
//Select customer with last name from field
$userQuery = 'select userName from Account where listId = :data';
$listQuery = 'select * from ListGame, Game where listId = :data and ListGame.gameId = Game.gameId';
$stid = oci_parse($conn, $userQuery);
$stid2 = oci_parse($conn, $listQuery);
oci_bind_by_name($stid, ':data', $data);
oci_bind_by_name($stid2, ':data', $data);
oci_execute($stid, OCI_DEFAULT);
//iterate through each row
while ($row = oci_fetch_array($stid, OCI_ASSOC)) {
$results[] = $row;
}
oci_execute($stid2, OCI_DEFAULT);
while ($row = oci_fetch_array($stid2, OCI_ASSOC)) {
$games[] = $row;
}
$results[] = $games;
echo json_encode($results);
oci_free_statement($stid);
oci_free_statement($stid2);
oci_close($conn);
}
示例8: close_connection
public function close_connection()
{
if (isset($this->connection)) {
oci_close($this->connection);
unset($this->connection);
}
}
示例9: disconnect
function disconnect()
{
if ($this->connectionId) {
oci_close($this->connectionId);
$this->connectionId = null;
}
}
示例10: get_filteredGames
function get_filteredGames($data)
{
// The connection string is loooooooong. It's easiest to copy/paste this line. Remember to replace 'username' and 'password'!
$conn = oci_connect('malz', '1Qaz2wsx', '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(Host=db1.chpc.ndsu.nodak.edu)(Port=1521)))(CONNECT_DATA=(SID=cs)))');
if ($data === 'all') {
$results = array();
$query = 'select * from Game';
$stid = oci_parse($conn, $query);
oci_bind_by_name($stid, ':data', $data);
oci_execute($stid);
//iterate through each row
while ($row = oci_fetch_array($stid, OCI_ASSOC)) {
$results[] = $row;
}
echo json_encode($results);
oci_free_statement($stid);
oci_close($conn);
} else {
$results = array();
$data = $data . '%';
$query = 'select * from Game where gameName like :data';
$stid = oci_parse($conn, $query);
oci_bind_by_name($stid, ':data', $data);
oci_execute($stid);
//iterate through each row
while ($row = oci_fetch_array($stid, OCI_ASSOC)) {
$results[] = $row;
}
echo json_encode($results);
oci_free_statement($stid);
oci_close($conn);
}
}
示例11: loginChk
function loginChk($conn)
{
isset($_POST["email"]);
isset($_POST["pass1"]);
global $username, $password, $password_enc;
/* *** A1 - Injection attacks, converted all SQL statments to include binding/placeholders to prevent injection attacks.
*
*/
//check password in database
$s = oci_parse($conn, "SELECT username FROM tblusers WHERE username=:username_prefix AND password=:pw");
oci_bind_by_name($s, ':username_prefix', $username);
oci_bind_by_name($s, ':pw', $password_enc);
oci_execute($s);
//evaluate based on db information
$res = oci_fetch_row($s);
if ($res) {
oci_free_statement($s);
oci_close($conn);
return true;
} else {
oci_free_statement($s);
oci_close($conn);
echo "Username or password were incorrect.</br> Please try to login again, <a href='login.html'>click to return to login page</a>.";
return false;
}
}
示例12: desconectar
public static function desconectar()
{
oci_close($this->conn);
//cierro la conexion activa
$this->conn = null;
//elimina conexion
}
示例13: actualizarPassword
function actualizarPassword($newpassword, $token)
{
$conex = DataBase::getInstance();
$stid = oci_parse($conex, "UPDATE FISC_USERS SET \n\t\t\t\t\t\tpassword=:newpassword\n\t\t\t\t WHERE token=:token");
if (!$stid) {
oci_free_statement($stid);
oci_close($conex);
return false;
}
// Realizar la lógica de la consulta
oci_bind_by_name($stid, ':token', $token);
oci_bind_by_name($stid, ':newpassword', $newpassword);
$r = oci_execute($stid, OCI_NO_AUTO_COMMIT);
if (!$r) {
oci_free_statement($stid);
oci_close($conex);
return false;
}
$r = oci_commit($conex);
if (!$r) {
oci_free_statement($stid);
oci_close($conex);
return false;
}
oci_free_statement($stid);
// Cierra la conexión Oracle
oci_close($conex);
return true;
}
示例14: disconnectInternal
/**
* Disconnects from the database.
* Does nothing if there was no connection established.
*
* @return void
*/
protected function disconnectInternal()
{
if (!$this->isConnected) {
return;
}
$this->isConnected = false;
oci_close($this->resource);
}
示例15: close
public function close() {
$statement = oci_parse($this->connection, "COMMIT");
if($this->use_transaction) {
oci_execute($statement);
oci_free_statement($statement);
oci_close($this->connection);
}
}