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


PHP ociparse函数代码示例

本文整理汇总了PHP中ociparse函数的典型用法代码示例。如果您正苦于以下问题:PHP ociparse函数的具体用法?PHP ociparse怎么用?PHP ociparse使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ociparse函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: query

 function query($SQLCmd)
 {
     if (!$this->isConnect) {
         return null;
     }
     $stmt = ociparse($this->connection, $SQLCmd);
     ociexecute($stmt, OCI_DEFAULT);
     $results = array();
     oci_fetch_all($stmt, $results, 0, -1, OCI_FETCHSTATEMENT_BY_COLUMN);
     $rs = new ResultSet();
     $rs->setHolder($results);
     oci_free_statement($stmt);
     return $rs;
 }
开发者ID:bryanbacus,项目名称:skripsi-martin,代码行数:14,代码来源:ORA8Access.php

示例2: insert_id

 function insert_id($table)
 {
     $sql = "SELECT max(id) ID FROM {$table}";
     $query = ociparse($this->conn, $sql);
     ociexecute($query);
     ocifetchinto($query, $row, OCI_BOTH);
     return $row[ID];
 }
开发者ID:pamcruz,项目名称:unimedjp,代码行数:8,代码来源:oracle.class.php

示例3: parse

 /** parse a query and return a statement */
 function parse($query)
 {
     $this->query = $query;
     $stmt = @ociparse($this->conn, $query);
     $this->stmt = $stmt;
     $this->error();
     return $stmt;
 }
开发者ID:BackupTheBerlios,项目名称:phporacleadmin,代码行数:9,代码来源:database.lib.php

示例4: realisateurParId

 public static function realisateurParId($id)
 {
     $bd = new Mconnect();
     $connect = $bd->getRessource();
     $stmt = ociparse($connect, "select p.ID_PERS, p.NOM_PERS, p.PRENOM_PERS\r\t\t\t\t\t\t\t\t\tfrom PERSONNE p, REALISER r\r\t\t\t\t\t\t\t\t\tWHERE p.ID_PERS=r.ID_PERS\r\t\t\t\t\t\t\t\t\tAND r.ID_FILM='" . $id . "'");
     ociexecute($stmt, OCI_DEFAULT);
     $tab = Mutilitaire::tableau($stmt);
     return $tab;
     $bd->close();
 }
开发者ID:googlecode-mirror,项目名称:projettuteurexml,代码行数:10,代码来源:Mpersonne.php

示例5: 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;
 }
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:15,代码来源:OracleConnection.php

示例6: ociparse

 function &_doQuery($queryString)
 {
     $stmt = ociparse($this->_connection, $queryString);
     if ($stmt && ociexecute($stmt)) {
         $rs =& new CopixDbResultSetOci8($stmt);
         $rs->_connector =& $this;
         return $rs;
     } else {
         return false;
     }
 }
开发者ID:BackupTheBerlios,项目名称:phpaie,代码行数:11,代码来源:CopixDbConnection.oci8.class.php

示例7: select_genres

 public function select_genres()
 {
     //Connexion à la base
     $bd = new Mconnect();
     $connect = $bd->getRessource();
     $stmt = ociparse($connect, "select NOM_GENRE, ID_GENRE from GENRE ORDER BY NOM_GENRE");
     //On parse la requête à effectuer sans oublier de lui passer la chaine de connexion en paramêtre
     ociexecute($stmt, OCI_DEFAULT);
     //On execute la requête en lui passant l'option OCI_DEFAULT
     $bd->close();
     $tab = Mutilitaire::tableau($stmt);
     return $tab;
 }
开发者ID:googlecode-mirror,项目名称:projettuteurexml,代码行数:13,代码来源:Mgenres.php

示例8: db_query

/**
 *  db_query() - Query the database
 *
 *  NOTE - the OCI version of this may be somewhat inefficient
 *  for large result sets (hundreds or thousands of rows selected)
 *  However - most queries are returning 25-50 rows
 *
 *  @param		string	SQL statement
 *  @param		int		How many rows do you want returned
 *  @param		int		Of matching rows, return only rows starting here
 */
function db_query($qstring, $limit = '-1', $offset = 0)
{
    global $QUERY_COUNT, $sys_db_results, $sys_db_row_pointer, $sys_db_oci_commit_mode;
    $QUERY_COUNT++;
    $stmt = @ociparse($gfconn, $qstring);
    if (!$stmt) {
        return 0;
    } else {
        if ($limit > 0) {
            if (!$offset || $offset < 0) {
                $offset = 0;
            }
        }
        $res = @ociexecute($stmt, $sys_db_oci_commit_mode);
        if (!$res) {
            return 0;
        } else {
            //if offset, seek to starting point
            //potentially expensive if large offset
            //however there is no data_seek feature AFAICT
            $more_data = true;
            if ($offset > 0) {
                for ($i = 0; $i < $offset; $i++) {
                    //burn them off
                    @ocifetchinto($res, $x);
                    if (!$x[1]) {
                        //if no data be returned
                        //get out of loop
                        $more_data = false;
                        break;
                    }
                }
            }
            $i = 0;
            while ($more_data) {
                $i++;
                @ocifetchinto($res, $x, 'OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS');
                $sys_db_results[$res][$i - 1] = $x;
                //see if data is being returned && we are
                //still within the requested $limit
                if (count($x) < 1 || $limit > 0 && $i >= $limit) {
                    $more_data = false;
                }
            }
            $sys_db_row_pointer[$res] = 0;
            return $res;
        }
    }
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:60,代码来源:database-oci8.php

示例9: query_exec

 function query_exec($query)
 {
     # IMPORT MYSQL PARAMETERS (NOTE: IT WORKS WITH ABSOLUTE PATH ONLY !!)
     include '../config/registry_oracle_db.php';
     # open connection to db
     //putenv("ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0");
     $conn = OCILogOn($user_db, $password_db, $db) or die("Could not connect to Oracle database!") or die(ocierror());
     # execute the EXEC query
     $statement = ociparse($conn, $query);
     $risultato = ociexecute($statement);
     # close connection
     ocilogoff($conn);
     $a = 1;
     return $a;
 }
开发者ID:athoncopy,项目名称:athon,代码行数:15,代码来源:SVUOTA_REGISTRY_DB.php

示例10: 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;
}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:16,代码来源:dbconnection.ora.php

示例11: ociparse

<?php 
$sqlTotvsSG2010 = ociparse($totvsConexao, "SELECT G2_RECURSO\r\n\t                                              , G2_OPERAC\r\n\t\t\t\t\t\t\t\t\t\t\t\t  , G2_DESCRI\r\n\t\t\t\t\t\t\t\t\t\t\t\t  , G2_PRODUTO\r\n\t\t\t\t\t\t\t\t\t\t\t\t  , R_E_C_N_O_\r\n    \t\t\t\t\t\t\t\t\t\t      , D_E_L_E_T_\r\n\t\t\t\t\t\t\t\t\t\t\t  FROM SG2010\r\n\t\t\t\t\t\t\t\t\t\t      ORDER BY R_E_C_N_O_");
ociexecute($sqlTotvsSG2010);
while ($rowTotvsSG2010 = oci_fetch_array($sqlTotvsSG2010)) {
    $sqlPcpOperacao = mysql_query("SELECT null FROM tb_pcp_operacao WHERE CO_RECNO = '" . $rowTotvsSG2010['R_E_C_N_O_'] . "'", $conexaoExtranet) or die(mysql_error());
    if (mysql_num_rows($sqlPcpOperacao) == 0) {
        if (trim($rowTotvsSG2010['D_E_L_E_T_']) == '*') {
            mysql_query("INSERT INTO tb_pcp_operacao (CO_RECURSO\r\n\t\t\t\t\t     \t     , CO_OPERACAO\r\n\t\t\t\t\t\t\t\t , DS_OPERACAO\r\n\t\t\t\t\t\t\t\t , CO_PRODUTO\r\n\t\t\t\t\t\t\t\t , CO_RECNO\r\n\t\t\t\t\t\t\t\t , FL_DELET)\r\n\t\t\t\t\t\t\t VALUES('" . trim($rowTotvsSG2010['G2_RECURSO']) . "' \r\n\t\t\t\t\t\t\t     , '" . trim($rowTotvsSG2010['G2_OPERAC']) . "'\r\n\t\t\t\t\t\t\t\t , '" . trim($rowTotvsSG2010['G2_DESCRI']) . "'\r\n\t\t\t\t\t\t\t\t , '" . trim($rowTotvsSG2010['G2_PRODUTO']) . "'\r\n\t\t\t\t\t\t\t\t , '" . $rowTotvsSG2010['R_E_C_N_O_'] . "'\r\n\t\t\t\t\t\t\t\t , '*')", $conexaoExtranet) or die(mysql_error());
        } else {
            mysql_query("INSERT INTO tb_pcp_operacao (CO_RECURSO\r\n\t\t\t\t\t     \t     , CO_OPERACAO\r\n\t\t\t\t\t\t\t\t , DS_OPERACAO\r\n\t\t\t\t\t\t\t\t , CO_PRODUTO\r\n\t\t\t\t\t\t\t\t , CO_RECNO)\r\n\t\t\t\t\t\t\t VALUES('" . trim($rowTotvsSG2010['G2_RECURSO']) . "' \r\n\t\t\t\t\t\t\t     , '" . trim($rowTotvsSG2010['G2_OPERAC']) . "'\r\n\t\t\t\t\t\t\t\t , '" . trim($rowTotvsSG2010['G2_DESCRI']) . "'\r\n\t\t\t\t\t\t\t\t , '" . trim($rowTotvsSG2010['G2_PRODUTO']) . "'\r\n\t\t\t\t\t\t\t\t , '" . $rowTotvsSG2010['R_E_C_N_O_'] . "')", $conexaoExtranet) or die(mysql_error());
        }
    } else {
        if (trim($rowTotvsSG2010['D_E_L_E_T_']) == '*') {
            mysql_query("UPDATE tb_pcp_operacao SET\r\n\t\t\t\t\t             CO_RECURSO    = '" . trim($rowTotvsSG2010['G2_RECURSO']) . "'\r\n\t\t\t\t\t\t\t\t , CO_OPERACAO = '" . trim($rowTotvsSG2010['G2_OPERAC']) . "'\r\n\t\t\t\t\t\t\t\t , DS_OPERACAO = '" . trim($rowTotvsSG2010['G2_DESCRI']) . "'\r\n\t\t\t\t\t\t\t\t , CO_PRODUTO  = '" . trim($rowTotvsSG2010['G2_PRODUTO']) . "'\r\n\t\t\t\t\t\t\t\t , FL_DELET    = '*'\r\n\t\t\t\t\t \t\t WHERE CO_RECNO = '" . $rowTotvsSG2010['R_E_C_N_O_'] . "'", $conexaoExtranet) or die(mysql_error());
        } else {
            mysql_query("UPDATE tb_pcp_operacao SET\r\n\t\t\t\t\t     \t     CO_RECURSO    = '" . trim($rowTotvsSG2010['G2_RECURSO']) . "'\r\n\t\t\t\t\t\t\t\t , CO_OPERACAO = '" . trim($rowTotvsSG2010['G2_OPERAC']) . "'\r\n\t\t\t\t\t\t\t\t , DS_OPERACAO = '" . trim($rowTotvsSG2010['G2_DESCRI']) . "'\r\n\t\t\t\t\t\t\t\t , CO_PRODUTO  = '" . trim($rowTotvsSG2010['G2_PRODUTO']) . "'\r\n\t\t\t\t\t \t\t WHERE CO_RECNO = '" . $rowTotvsSG2010['R_E_C_N_O_'] . "'", $conexaoExtranet) or die(mysql_error());
        }
    }
}
开发者ID:wtnj,项目名称:sincronismo-totvs-extranet,代码行数:19,代码来源:sincronismo_GERAL_SG2010.php

示例12: _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;
 }
开发者ID:jerzzz777,项目名称:cake-cart,代码行数:43,代码来源:dbo_oracle.php

示例13: foreach

         }
         @pg_close($db);
     } else {
         echo "<div align=center><font face=Verdana size=-2 color=red><b>Can't connect to PostgreSQL server</b></font></div>";
     }
     break;
 case 'Oracle':
     $db = @ocilogon($_POST['mysql_l'], $_POST['mysql_p'], $_POST['mysql_db']);
     if ($error = @ocierror()) {
         echo "<div align=center><font face=Verdana size=-2 color=red><b>Can't connect to Oracle server.<br>" . $error['message'] . "</b></font></div>";
     } else {
         $querys = @explode(';', $_POST['db_query']);
         foreach ($querys as $num => $query) {
             if (strlen($query) > 5) {
                 echo "<font face=Verdana size=-2 color=green><b>Query#" . $num . " : " . htmlspecialchars($query) . "</b></font><br>";
                 $stat = @ociparse($db, $query);
                 @ociexecute($stat);
                 if ($error = @ocierror()) {
                     echo "<table width=100%><tr><td><font face=Verdana size=-2>Error : <b>" . $error['message'] . "</b></font></td></tr></table><br>";
                 } else {
                     $rowcount = @ocirowcount($stat);
                     if ($rowcount != 0) {
                         echo "<table width=100%><tr><td><font face=Verdana size=-2>affected rows : <b>" . $rowcount . "</b></font></td></tr></table><br>";
                     } else {
                         echo "<table width=100%><tr>";
                         for ($j = 1; $j <= @ocinumcols($stat); $j++) {
                             echo "<td bgcolor=#cccccc><font face=Verdana size=-2><b>&nbsp;" . htmlspecialchars(@ocicolumnname($stat, $j)) . "&nbsp;</b></font></td>";
                         }
                         echo "</tr>";
                         while (ocifetch($stat)) {
                             echo "<tr>";
开发者ID:Theov,项目名称:webshells,代码行数:31,代码来源:r57.php

示例14: ociparse

<?php 
$sqlTotvsSA3010 = ociparse($totvsConexao, "SELECT COUNT(*) AS QTD_SA3010 FROM SA3010");
ociexecute($sqlTotvsSA3010);
$rowTotvsSA3010 = oci_fetch_array($sqlTotvsSA3010);
$quantidadeTotvsSA3010 = $rowTotvsSA3010['QTD_SA3010'];
$sqlMySQLFatVendedor = mysql_query("SELECT COUNT(*) AS QTD_FAT_VENDEDOR FROM tb_fat_Vendedor", $conexaoExtranet) or die(mysql_error());
$rowMySQLFatVendedor = mysql_fetch_array($sqlMySQLFatVendedor);
$quantidadeMySQLFatVendedor = $rowMySQLFatVendedor['QTD_FAT_VENDEDOR'];
if ($quantidadeTotvsSA3010 != $quantidadeMySQLFatVendedor) {
    $quantidadeDiferenca = $quantidadeTotvsSA3010 - $quantidadeMySQLFatVendedor;
    enviaEmailNotificacao(date("d/m/Y h:i:s"), "FatVendedor", $quantidadeTotvsSA3010, $quantidadeMySQLFatVendedor, $quantidadeDiferenca);
    echo "Sincronismo Validação Tabela de Vendedor Concluido e e-mail de Notificacao Enviado.<br>";
} else {
    echo "Sincronismo Validação Tabela de Vendedor Concluido sem Divergencia.<br>";
}
开发者ID:wtnj,项目名称:sincronismo-totvs-extranet,代码行数:15,代码来源:valida_sincronismo_GERAL_SA3010.php

示例15: ociparse

<?php

$sqlTotvsSG2010 = ociparse($totvsConexao, "SELECT G2_RECURSO\r\n\t                                              , G2_OPERAC\r\n\t\t\t\t\t\t\t\t\t\t\t\t  , G2_DESCRI\r\n\t\t\t\t\t\t\t\t\t\t\t\t  , G2_PRODUTO\r\n\t\t\t\t\t\t\t\t\t\t\t\t  , R_E_C_N_O_\r\n    \t\t\t\t\t\t\t\t\t\t\t , D_E_L_E_T_\r\n\t\t\t\t\t\t\t\t\t\t\t  FROM SG2010\r\n\t\t\t\t\t\t\t\t\t\t\t  WHERE R_E_C_N_O_ = '" . $rowTotvsLog["R_E_C_N_O_"] . "'");
ociexecute($sqlTotvsSG2010);
$rowTotvsSG2010 = oci_fetch_array($sqlTotvsSG2010);
if ($rowTotvsLog["TP_LOG"] == "Insert") {
    mysql_query("INSERT INTO tb_pcp_operacao (CO_RECURSO\r\n\t\t\t\t\t     , CO_OPERACAO\r\n\t\t\t\t\t\t , DS_OPERACAO\r\n\t\t\t\t\t\t , CO_PRODUTO\r\n\t\t\t\t\t\t , CO_RECNO)\r\n\t\t\t\t\t VALUES('" . trim($rowTotvsSG2010['G2_RECURSO']) . "' \r\n\t\t\t\t\t     , '" . trim($rowTotvsSG2010['G2_OPERAC']) . "'\r\n\t\t\t\t\t     , '" . trim($rowTotvsSG2010['G2_DESCRI']) . "'\r\n\t\t\t\t\t     , '" . trim($rowTotvsSG2010['G2_PRODUTO']) . "'\r\n\t\t\t\t\t     , '" . $rowTotvsSG2010['R_E_C_N_O_'] . "')", $conexaoExtranet);
} elseif ($rowTotvsLog["TP_LOG"] == "Update") {
    mysql_query("UPDATE tb_pcp_operacao SET\r\n\t\t\t\t\t     CO_RECURSO    = '" . trim($rowTotvsSG2010['G2_RECURSO']) . "'\r\n\t\t\t\t\t     , CO_OPERACAO = '" . trim($rowTotvsSG2010['G2_OPERAC']) . "'\r\n\t\t\t\t\t\t , DS_OPERACAO = '" . trim($rowTotvsSG2010['G2_DESCRI']) . "'\r\n\t\t\t\t\t\t , CO_PRODUTO  = '" . trim($rowTotvsSG2010['G2_PRODUTO']) . "'\r\n\t\t\t\t\t WHERE CO_RECNO = '" . $rowTotvsSG2010['R_E_C_N_O_'] . "'", $conexaoExtranet);
} elseif ($rowTotvsLog["TP_LOG"] == "Update Campo D_E_L_E_T_") {
    if (trim($rowTotvsSG2010['D_E_L_E_T_']) == '*') {
        mysql_query("UPDATE tb_pcp_operacao SET FL_DELET = '*' WHERE CO_RECNO = '" . $rowTotvsSG2010['R_E_C_N_O_'] . "'", $conexaoExtranet);
    } else {
        mysql_query("UPDATE tb_pcp_operacao SET FL_DELET = null WHERE CO_RECNO = '" . $rowTotvsSG2010['R_E_C_N_O_'] . "'", $conexaoExtranet);
    }
} elseif ($rowTotvsLog["TP_LOG"] == "Delete") {
    mysql_query("UPDATE tb_pcp_operacao SET FL_DELET = '*' WHERE CO_RECNO = '" . $rowTotvsSG2010['R_E_C_N_O_'] . "'", $conexaoExtranet);
}
开发者ID:wtnj,项目名称:sincronismo-totvs-extranet,代码行数:18,代码来源:sincronismo_SG2010.php


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