本文整理汇总了PHP中oci_fetch_object函数的典型用法代码示例。如果您正苦于以下问题:PHP oci_fetch_object函数的具体用法?PHP oci_fetch_object怎么用?PHP oci_fetch_object使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了oci_fetch_object函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: fetch
public function fetch()
{
if ($this->_fetchMode == jDbConnection::FETCH_CLASS || $this->_fetchMode == jDbConnection::FETCH_INTO) {
$res = oci_fetch_object($this->_idResult);
if ($res) {
$values = get_object_vars($res);
$classObj = new $this->_fetchModeParam();
foreach ($values as $k => $value) {
$attrName = strtolower($k);
$ociClassName = 'OCI-Lob';
// Check if we have a Lob, to read it correctly
if ($value instanceof $ociClassName) {
$classObj->{$attrName} = $value->read($value->size());
} else {
$classObj->{$attrName} = $value;
}
}
$res = $classObj;
}
} else {
$res = oci_fetch_object($this->_idResult);
}
if ($res && count($this->modifier)) {
foreach ($this->modifier as $m) {
call_user_func_array($m, array($res, $this));
}
}
return $res;
}
开发者ID:mdouchin,项目名称:jelix,代码行数:29,代码来源:oci.dbresultset.php
示例2: fetch
public function fetch($stid)
{
$result = array();
while (($data = oci_fetch_object($stid)) != false) {
$result[] = $data;
}
return $result;
}
开发者ID:hendisantika,项目名称:ajax-crud-bootstrap,代码行数:8,代码来源:oci8.php
示例3: findOneSimple
public function findOneSimple($tSql, $sClassRow)
{
$pRs = $this->query($this->bind($tSql));
if (empty($pRs)) {
return null;
}
$oRow = oci_fetch_object($pRs);
return $oRow;
}
开发者ID:clavat,项目名称:mkframework,代码行数:9,代码来源:sgbd_oracle.php
示例4: getUltimaRevisioVehicle
function getUltimaRevisioVehicle($codi_vehicle)
{
$oci = new Oci($_SESSION['user']['usuari'], $_SESSION['user']['passwd']);
$req = "SELECT \r\n\t\t\t\t\t\tdata_l, \r\n\t\t\t\t\t\tkms \r\n\t\t\t\t\tFROM \r\n\t\t\t\t\t\trevisio \r\n\t\t\t\t\tWHERE codi IN ( \r\n\t\t\t\t\t\tselect max(rev.codi) \r\n\t\t\t\t\t\tfrom revisio rev \r\n\t\t\t\t\t\twhere rev.codi_vehicle = :codi_vehicle \r\n\t\t\t\t\t\tgroup by rev.codi_vehicle \r\n\t\t\t\t\t)";
$stid = oci_parse($oci->getConnection(), $req);
oci_bind_by_name($stid, ":codi_vehicle", $codi_vehicle);
oci_execute($stid);
$ultima = oci_fetch_object($stid);
return $ultima;
}
开发者ID:kimpa2007,项目名称:PracticaPHP_Oracle,代码行数:10,代码来源:LlistaRevisio.php
示例5: buscarMesJove
private function buscarMesJove()
{
$codi_delegacio = $this->_infos->CODI_DELEGACIO;
$oci = new Oci($_SESSION['user']['usuari'], $_SESSION['user']['passwd']);
$req = "SELECT codi_delegacio, min(data_alta), max(codi) as CODI FROM venedor WHERE codi_delegacio = :codi_delegacio group by codi_delegacio";
$stid = oci_parse($oci->getConnection(), $req);
oci_bind_by_name($stid, ":codi_delegacio", $codi_delegacio);
oci_execute($stid);
$jove = oci_fetch_object($stid);
return $jove->CODI;
}
开发者ID:kimpa2007,项目名称:PracticaPHP_Oracle,代码行数:11,代码来源:Revisio.php
示例6: getAllEvents
function getAllEvents()
{
global $conn_oracle;
$sql = oci_parse($conn_oracle, "select *\nfrom TELEBET.SP_EVENT e\nwhere E.DATE_TIME > sysdate - interval '1' day\nand e.date_time < sysdate + interval '2' day");
oci_execute($sql);
while (($row = oci_fetch_object($sql)) != false) {
$testEvent[] = $row;
}
// $testEvent = $sql->fetchAll(PDO::FETCH_OBJ );
return $testEvent;
}
开发者ID:slovoslagac,项目名称:New_Report,代码行数:11,代码来源:testEvent.php
示例7: isAdmin
}
if ($login == '1') {
return true;
} else {
return false;
}
}
}
function isAdmin()
{
global $database;
$details = oci_parse($conn, "SELECT * FROM USERSETUP WHERE USER_ID='{$this->staff_id}'");
oci_execute($details);
while ($row = oci_fetch_object($details)) {
$this->staffnames = $row->SURNAME;
开发者ID:Kemallyson,项目名称:Wizglobal,代码行数:15,代码来源:staffSetup.class.php
示例8: db_query
function db_query($sql, $bind = null)
{
$c = db_connect();
$res = array();
$s = oci_parse($c, $sql);
if ($bind != null) {
foreach ($bind as $key => $value) {
oci_bind_by_name($s, ":" . $key, $value);
}
}
oci_execute($s);
while ($row = oci_fetch_object($s)) {
$res[] = $row;
}
return $res;
}
开发者ID:hiroyalty,项目名称:sdpsports,代码行数:16,代码来源:xml.php
示例9: getVehiclesDisponibles
function getVehiclesDisponibles()
{
$oci = new Oci($_SESSION['user']['usuari'], $_SESSION['user']['passwd']);
$req = "SELECT \r\n\t\t\t\t\t\tv.codi, \r\n\t\t\t\t\t\tv.matricula, \r\n\t\t\t\t\t\tv.color, \r\n\t\t\t\t\t\tv.combustible,\r\n\t\t\t\t\t\tm.nom as MODEL \r\n\t\t\t\t\tFROM vehicle v JOIN model m ON v.model_codi = m.codi\r\n\t\t\t\t\tWHERE v.codi NOT IN (\r\n\t\t\t\t\t\tSELECT codi_vehicle \r\n\t\t\t\t\t\tFROM lloguer WHERE dataf is null) \r\n\t\t\t\t\tGROUP BY v.codi, v.matricula, v.color, v.combustible, m.nom";
$stid = oci_parse($oci->getConnection(), $req);
oci_execute($stid);
if ($stid) {
$result_array = array();
$i = 0;
while ($temp = oci_fetch_object($stid)) {
$result_array[$i] = $temp;
$i++;
}
}
oci_free_statement($stid);
$oci->tancarConnexio();
return $result_array;
}
开发者ID:kimpa2007,项目名称:PracticaPHP_Oracle,代码行数:18,代码来源:LlistaVehicle.php
示例10: consultarBdd
private function consultarBdd()
{
$oci = new Oci($_SESSION['user']['usuari'], $_SESSION['user']['passwd']);
$req = "SELECT l.codi, \r\n\t\t\t\t\t\tc.nom || ' ' || c.cognoms as CLIENT, \r\n\t\t\t\t\t\tv.nom || ' ' || v.cognoms as VENEDOR, \r\n\t\t\t\t\t\tve.matricula,\r\n\t\t\t\t\t\tl.kmi, \r\n\t\t\t\t\t\tl.datai\r\n\t\t\t\t\tFROM\t\r\n\t\t\t\t\t\tlloguer l JOIN client c ON l.codi_client = c.codi \r\n\t\t \t\t\t\t\t JOIN venedor v ON l.codi_venedor = v.codi\r\n\t\t\t\t\t\t\t JOIN vehicle ve ON l.codi_vehicle = ve.codi \r\n\t\t\t\t\t\tWHERE dataf is null\r\n\t\t\t\t\t";
$stid = oci_parse($oci->getConnection(), $req);
oci_execute($stid);
if ($stid) {
$result_array = array();
$i = 0;
while ($temp = oci_fetch_object($stid)) {
$result_array[$i] = $temp;
$i++;
}
}
oci_free_statement($stid);
$oci->tancarConnexio();
$this->_llista = $result_array;
}
开发者ID:kimpa2007,项目名称:PracticaPHP_Oracle,代码行数:18,代码来源:LlistaLloguer.php
示例11: retornaTotal
function retornaTotal($mes, $ano)
{
include '../bd/wint.php';
//select que recebe parametros da funcao
$sql = "SELECT \n SUM(VLTOTAL) AS TOTAL\n FROM \n PCNFSAID\n WHERE \n CODFILIAL='3' AND\n OBS IS NULL AND\n EXTRACT(MONTH FROM dtsaida) = '{$mes}' AND\n EXTRACT(YEAR FROM dtsaida) = '{$ano}'";
//declaracao variaveis
$faturamento = 0;
//executa sql
$std = oci_parse($conexao, $sql);
oci_execute($std);
while ($row = oci_fetch_object($std)) {
$faturamento = $row->TOTAL;
}
//fecha conexao
oci_close($conexao);
//retarna valores
return $faturamento;
}
开发者ID:emersonandre,项目名称:projeto-indicadores-autoviacao,代码行数:18,代码来源:ajaxFaturamentoRolito.php
示例12: doLogin
if ($_SESSION['LoggedIn']) {
return true;
} else {
return false;
}
}
/**
* Check username and password against DB
*
* @return true/false
*/
function doLogin($username, $password)
{
global $conn;
//$this->connect();
$this->username = $username;
$this->password = $password;
// check db for user and pass here.
$sql = sprintf("SELECT * FROM MEMBERPASS WHERE username = '%s' and passwrd = '%s'", $this->clean($this->username), $this->clean(md5($this->password)));
$result = oci_parse($conn, $sql);
oci_execute($result);
$i = 0;
while ($row = oci_fetch_object($result)) {
//$refno= $row->REFNO;
$i++;
}
// If no user/password combo exists return false
if ($i != 1) {
$this->disconnect();
return false;
} else {
//$row1 = ibase_fetch_assoc($result);
$q = "select REFNO,CATEGORY, CODE from MEMBERPASS WHERE username ='{$this->username}'";
$q1 = oci_parse($conn, $q);
oci_execute($q1);
while ($row1 = oci_fetch_object($q1)) {
$this->ref_no = $row1->REFNO;
$this->category = $row1->CATEGORY;
$this->codey = $row1->CODE;
}
// more secure to regenerate a new id.
session_regenerate_id();
//set session vars up
$_SESSION['LoggedIn'] = true;
$_SESSION['username'] = $this->username;
开发者ID:Kemallyson,项目名称:Wizglobal,代码行数:45,代码来源:LoginSystem.class.php
示例13: consultarBdd
private function consultarBdd()
{
$oci = new Oci($_SESSION['user']['usuari'], $_SESSION['user']['passwd']);
$req = 'SELECT a.descripcio as "DESC", codi_accessori as "CODI" FROM accessori a JOIN model_accessori ma ON a.codi = ma.codi_accessori WHERE codi_model=:cm';
$stid = oci_parse($oci->getConnection(), $req);
oci_bind_by_name($stid, ":cm", $this->_model);
oci_execute($stid);
if ($stid) {
$result_array = array();
$i = 0;
while ($temp = oci_fetch_object($stid)) {
$result_array[$i] = $temp;
$i++;
}
}
oci_free_statement($stid);
$oci->tancarConnexio();
$this->_llista = $result_array;
}
开发者ID:kimpa2007,项目名称:PracticaPHP_Oracle,代码行数:19,代码来源:LlistaAccesoris.php
示例14: consultarBdd
private function consultarBdd()
{
$oci = new Oci($_SESSION['user']['usuari'], $_SESSION['user']['passwd']);
$req = 'SELECT m.codi, m.nom FROM model m
';
$stid = oci_parse($oci->getConnection(), $req);
oci_execute($stid);
if ($stid) {
$result_array = array();
$i = 0;
while ($temp = oci_fetch_object($stid)) {
$result_array[$i] = $temp;
$i++;
}
}
oci_free_statement($stid);
$oci->tancarConnexio();
$this->_llista = $result_array;
}
开发者ID:kimpa2007,项目名称:PracticaPHP_Oracle,代码行数:19,代码来源:LlistaModels.php
示例15: obtenirDades
function obtenirDades()
{
if (empty($this->_infos)) {
$oci = new Oci($_SESSION['user']['usuari'], $_SESSION['user']['passwd']);
$req = "SELECT * FROM models WHERE codi = :codi";
$stid = oci_parse($oci->getConnection(), $req);
oci_bind_by_name($stid, ":codi", $this->_id);
oci_execute($stid);
if ($stid) {
$result_array = array();
while ($temp = oci_fetch_object($stid)) {
$result_array[] = $temp;
}
}
oci_free_statement($stid);
oci_close($oci);
$this->_infos = $result_array;
}
return $this->_infos;
}
开发者ID:kimpa2007,项目名称:PracticaPHP_Oracle,代码行数:20,代码来源:Model.php
示例16: consultarBdd
private function consultarBdd()
{
$oci = new Oci($_SESSION['user']['usuari'], $_SESSION['user']['passwd']);
$req = 'SELECT
v.codi, v.nom, v.cognoms, d.nom as delegacio
FROM
venedor v JOIN delegacio d ON v.codi_delegacio = d.codi
';
$stid = oci_parse($oci->getConnection(), $req);
oci_execute($stid);
if ($stid) {
$result_array = array();
$i = 0;
while ($temp = oci_fetch_object($stid)) {
$result_array[$i] = $temp;
$i++;
}
}
oci_free_statement($stid);
$oci->tancarConnexio();
$this->_llista = $result_array;
}
开发者ID:kimpa2007,项目名称:PracticaPHP_Oracle,代码行数:22,代码来源:LlistaVenedors.php
示例17: _fetch_object
/**
* Result - object
*
* Returns the result set as an object
*
* @param string $class_name
* @return object
*/
protected function _fetch_object($class_name = 'stdClass')
{
$row = $this->curs_id ? oci_fetch_object($this->curs_id) : oci_fetch_object($this->stmt_id);
if ($class_name === 'stdClass' or !$row) {
return $row;
}
$class_name = new $class_name();
foreach ($row as $key => $value) {
$class_name->{$key} = $value;
}
return $class_name;
}
开发者ID:srsman,项目名称:89jian,代码行数:20,代码来源:oci8_result.php
示例18: fetchObject
/**
* Fetches the next row and returns it as an object.
*
* @param string $class OPTIONAL Name of the class to create.
* @param array $config OPTIONAL Constructor arguments for the class.
* @return mixed One object instance of the specified class.
* @throws \Zend\Db\Statement\Exception
*/
public function fetchObject($class = 'stdClass', array $config = array())
{
if (!$this->_stmt) {
return false;
}
$obj = oci_fetch_object($this->_stmt);
if ($error = oci_error($this->_stmt)) {
throw new OracleException($error);
}
/* @todo XXX handle parameters */
return $obj;
}
开发者ID:rexmac,项目名称:zf2,代码行数:20,代码来源:Oracle.php
示例19: _fetch_object
/**
* Result - object
*
* Returns the result set as an object
*
* @access private
* @return object
*/
function _fetch_object()
{
$result = array();
// If PHP 5 is being used we can fetch an result object
if (function_exists('oci_fetch_object')) {
$id = $this->curs_id ? $this->curs_id : $this->stmt_id;
return @oci_fetch_object($id);
}
// If PHP 4 is being used we have to build our own result
foreach ($this->result_array() as $key => $val) {
$obj = new stdClass();
if (is_array($val)) {
foreach ($val as $k => $v) {
$obj->{$k} = $v;
}
} else {
$obj->{$key} = $val;
}
$result[] = $obj;
}
return $result;
}
开发者ID:nigelpeters,项目名称:css-recruitment-ee,代码行数:30,代码来源:oci8_result.php
示例20: fetch
/**
* Fetch a value
*
* @param int $style to fetch values
* @param int $orientation cursor orientation
* @param int $offset offset
*
* @return mixed
* @throws \PDOException
*/
public function fetch($style = null, $orientation = null, $offset = null)
{
set_error_handler(array($this->_pdooci, "errorHandler"));
try {
$style = is_null($style) ? $this->_fetch_sty : $style;
$this->_fetch_sty = $style;
$rst = null;
switch ($style) {
case \PDO::FETCH_BOTH:
case \PDO::FETCH_BOUND:
$rst = \oci_fetch_array($this->_stmt, \OCI_BOTH + \OCI_RETURN_NULLS);
break;
case \PDO::FETCH_ASSOC:
$rst = \oci_fetch_array($this->_stmt, \OCI_ASSOC + \OCI_RETURN_NULLS);
$rst = $this->_fixResultKeys($rst);
break;
case \PDO::FETCH_NUM:
$rst = \oci_fetch_array($this->_stmt, \OCI_NUM + \OCI_RETURN_NULLS);
break;
case \PDO::FETCH_OBJ:
$rst = \oci_fetch_object($this->_stmt);
break;
}
$this->_current = $rst;
$this->_checkBinds();
} catch (\Exception $e) {
throw new \PDOException($e->getMessage());
}
restore_error_handler();
return $rst;
}
开发者ID:taq,项目名称:pdooci,代码行数:41,代码来源:Statement.php
注:本文中的oci_fetch_object函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论