当前位置: 首页>>代码示例>>PHP>>正文


PHP oci_close函数代码示例

本文整理汇总了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();
     }
 }
开发者ID:kaduck,项目名称:AutoEcole-05-01-2016,代码行数:18,代码来源:FacturationModel.php

示例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();
     }
 }
开发者ID:kaduck,项目名称:AutoEcole-05-01-2016,代码行数:16,代码来源:AddModel.php

示例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();
     }
 }
开发者ID:kaduck,项目名称:AutoEcole-05-01-2016,代码行数:18,代码来源:PermisModel.php

示例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();
     }
 }
开发者ID:kaduck,项目名称:AutoEcole-05-01-2016,代码行数:18,代码来源:ExamenModel.php

示例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();
     }
 }
开发者ID:kaduck,项目名称:AutoEcole-05-01-2016,代码行数:18,代码来源:VehiculeModel.php

示例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;
 }
开发者ID:vanckruz,项目名称:draftReports,代码行数:31,代码来源:class_fisc_ciudadanoDAO.php

示例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);
}
开发者ID:GabieJay,项目名称:CatBoard,代码行数:27,代码来源:List.php

示例8: close_connection

 public function close_connection()
 {
     if (isset($this->connection)) {
         oci_close($this->connection);
         unset($this->connection);
     }
 }
开发者ID:sergey-chekriy,项目名称:CRUD_Objects_Oracle_MySQL,代码行数:7,代码来源:oracle_database.php

示例9: disconnect

 function disconnect()
 {
     if ($this->connectionId) {
         oci_close($this->connectionId);
         $this->connectionId = null;
     }
 }
开发者ID:r-kitaev,项目名称:limb,代码行数:7,代码来源:lmbOciConnection.class.php

示例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);
    }
}
开发者ID:GabieJay,项目名称:CatBoard,代码行数:33,代码来源:Search.php

示例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;
    }
}
开发者ID:Emadbox,项目名称:eStore,代码行数:26,代码来源:login.php

示例12: desconectar

 public static function desconectar()
 {
     oci_close($this->conn);
     //cierro la conexion activa
     $this->conn = null;
     //elimina conexion
 }
开发者ID:salcedogeiner,项目名称:Alimentario,代码行数:7,代码来源:ConexionDB.php

示例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;
}
开发者ID:vanckruz,项目名称:draftReports,代码行数:29,代码来源:Controller_password.php

示例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);
 }
开发者ID:Satariall,项目名称:izurit,代码行数:14,代码来源:oracleconnection.php

示例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);
   }
 }
开发者ID:roycefu,项目名称:MIT-Mobile-Web,代码行数:8,代码来源:tech_cash.php


注:本文中的oci_close函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。