本文整理汇总了PHP中oci_fetch函数的典型用法代码示例。如果您正苦于以下问题:PHP oci_fetch函数的具体用法?PHP oci_fetch怎么用?PHP oci_fetch使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了oci_fetch函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: register
function register($login, $password, $name, $surname)
{
$conn = connect();
$stid = oci_parse($conn, 'SELECT ID FROM USERS WHERE ID = :0');
oci_bind_by_name($stid, ':0', $login);
oci_execute($stid);
oci_fetch($stid);
if (oci_result($stid, 'ID') > 0) {
notify('Пользователь с таким номером уже существует!');
oci_close($conn);
} else {
$salt = rand(1, 1000000);
$hash = md5($password . $salt);
$stid = oci_parse($conn, "INSERT INTO USERS (ID, HASH, SALT, NAME, SURNAME) VALUES (:0, :1, :2, :3, :4)");
oci_bind_by_name($stid, ':0', $login);
oci_bind_by_name($stid, ':1', $hash);
oci_bind_by_name($stid, ':2', $salt);
oci_bind_by_name($stid, ':3', $name);
oci_bind_by_name($stid, ':4', $surname);
if (oci_execute($stid)) {
oci_close($conn);
session_start();
$_SESSION['ID'] = $login;
header('Location: ./profile.php');
}
}
}
开发者ID:borapop,项目名称:course-2,代码行数:27,代码来源:functions.php
示例2: consultar
public function consultar()
{
//$prub = Conexion::getInstancia("system", "admin");
//$p=new Persona();
$persina = new PersonaDAO();
$aa = new ConexionDB("apoyo_alimentario", "apoyo_alimentario");
if ($aa->conectarDB()) {
$sesion = $aa->getConn();
$facultades = array();
$i = 0;
$sqltxt = "select * from facultad";
$stid = oci_parse($sesion, $sqltxt);
oci_execute($stid);
while (oci_fetch($stid)) {
$facultad = new Facultad();
$facultad->setIdfacultad(oci_result($stid, 'ID_FACULTAD'));
$facultad->setNombre_facultad(oci_result($stid, 'NOMBRE_FACULTAD'));
$facultades[$i] = $facultad;
$i += 1;
}
return $facultades;
//oci_parse($a, $sql_text);
//echo $a;
}
}
开发者ID:salcedogeiner,项目名称:Alimentario,代码行数:25,代码来源:ConsultasAux.php
示例3: select_data
function select_data($req)
{
$stmt = oci_parse($this->connection, $req);
oci_execute($stmt, OCI_DEFAULT);
while (oci_fetch($stmt)) {
echo oci_result($stmt, "TEST") . "<br>\n";
}
}
开发者ID:anisinfo,项目名称:osi,代码行数:8,代码来源:db.php
示例4: printCoreSet
/** Helper function for printing out core fulfillment options */
function printCoreSet($num)
{
global $conn;
$query = "SELECT core_code, description FROM vw_core_requirement WHERE core_set_id=" . $num . " ORDER BY report_order";
$data = oci_parse($conn, $query);
oci_execute($data);
while (oci_fetch($data)) {
echo "<option value='" . oci_result($data, 'CORE_CODE') . "'>" . oci_result($data, 'CORE_CODE') . "-" . oci_result($data, 'DESCRIPTION') . "</option>\n";
}
oci_free_statement($data);
}
开发者ID:ablaine,项目名称:Awesome-Scheduling-Machine,代码行数:12,代码来源:searchOptions.php
示例5: buscarIdSolicitud
public function buscarIdSolicitud($idestu, $idconvoc)
{
$idsol;
$sqltxt = "select k_idsolicitud from s_solicitud where k_estudiante = '" . $idestu . "' and k_convocatoria =" . $idconvoc;
$stid = oci_parse($_SESSION['sesion_logueado'], $sqltxt);
oci_execute($stid);
while (oci_fetch($stid)) {
$idsol = oci_result($stid, 'K_IDSOLICITUD');
}
return $idsol;
}
开发者ID:blacburn,项目名称:ApoyoAlimentario,代码行数:11,代码来源:SolicitudDAO.php
示例6: count_rows
function count_rows(&$conn, $select, $binds)
{
$sql = "SELECT COUNT(*) AS num_rows FROM({$select})";
$stmt = oci_parse($conn, $sql);
foreach ($binds as $handle => $var) {
oci_bind_by_name($stmt, $handle, $binds[$handle]);
}
oci_define_by_name($stmt, "NUM_ROWS", $num_rows);
oci_execute($stmt);
oci_fetch($stmt);
return $num_rows;
}
开发者ID:nsahoo,项目名称:cmssw-1,代码行数:12,代码来源:pager_functions.php
示例7: verTipoCondicionxSolicitud
public function verTipoCondicionxSolicitud($idcond)
{
//echo $idcond.">-----------id";
$sqltxt = "select t_condicion from s_condicion_se where k_idcondicion = " . $idcond;
$stid = oci_parse($_SESSION['sesion_logueado'], $sqltxt);
oci_execute($stid);
while (oci_fetch($stid)) {
// echo "---------->".oci_result($stid, 'T_CONDICION')."<----ENTRO WHILE";
$idtipo = oci_result($stid, 'T_CONDICION');
}
//echo "(".$idtipo.")";
return $idtipo;
}
开发者ID:blacburn,项目名称:ApoyoAlimentario,代码行数:13,代码来源:CondicionxSolicitudDAO.php
示例8: buscarFacultad
public function buscarFacultad($id_facultad)
{
$facultad = new Facultad();
$sqltxt = "select * from s_facultad where k_idfacultad = " . $id_facultad . "";
$stid = oci_parse($_SESSION['sesion_logueado'], $sqltxt);
oci_execute($stid);
while (oci_fetch($stid)) {
$facultad->setIdfacultad(oci_result($stid, 'K_IDFACULTAD'));
$facultad->setNombre_facultad(oci_result($stid, 'N_NOMFACULTAD'));
}
//echo $persona->getApellido_persona();
return $facultad;
}
开发者ID:blacburn,项目名称:ApoyoAlimentario,代码行数:13,代码来源:FacultadDAO.php
示例9: getId
function getId($db, $sql, $idName)
{
echo "{$this->log} - {$sql} <br />";
$idName = strtoupper($idName);
$stid = oci_parse($db, $sql);
oci_execute($stid);
$id = NULL;
while (oci_fetch($stid)) {
//echo "dbfunctions.php - oci_result for $idName: " . oci_result($stid, $idName) . '<br />';
$id = oci_result($stid, $idName);
}
oci_free_statement($stid);
return $id;
}
开发者ID:GeorgesAlkhouri,项目名称:openmuseum,代码行数:14,代码来源:DbIdFetcher.php
示例10: isUserPresent
function isUserPresent($userName, $password)
{
ini_set('display_errors', 'On');
$db = "w4111c.cs.columbia.edu:1521/adb";
$conn = oci_connect("kpg2108", "test123", $db);
$stmt = oci_parse($conn, "select count(*) as NUM_ROWS from users where login_id = '{$userName}' and password ='{$password}'");
oci_define_by_name($stmt, 'NUM_ROWS', $this->num_rows);
oci_execute($stmt);
oci_fetch($stmt);
oci_close($conn);
if ($this->num_rows > 0) {
return true;
} else {
return false;
}
}
开发者ID:NLP-Project,项目名称:AirLine-Reservation-System,代码行数:16,代码来源:UserAccountModel.php
示例11: verDias
public function verDias()
{
$dias = array();
$i = 0;
$sqltxt = "select * from s_dia";
$stid = oci_parse($_SESSION['sesion_logueado'], $sqltxt);
//echo $sqltxt;
oci_execute($stid);
while (oci_fetch($stid)) {
$dia = new DiaSolicitud();
$dia->setId_dia(oci_result($stid, 'K_IDDIA'));
$dia->setNombre_dia(oci_result($stid, 'N_NOMDIA'));
$dias[$i] = $dia;
$i += 1;
}
return $dias;
}
开发者ID:blacburn,项目名称:ApoyoAlimentario,代码行数:17,代码来源:DiaSolicitudDAO.php
示例12: buscarPersonaxUsuario
public function buscarPersonaxUsuario($usuario)
{
$persona = new Persona();
$sqltxt = "select * from s_persona where usuario = '" . $usuario . "'";
$stid = oci_parse($_SESSION['sesion_logueado'], $sqltxt);
oci_execute($stid);
while (oci_fetch($stid)) {
//$persona->setCodigo_persona(oci_result($stid, 'CODIGO'));
$persona->setNombre_persona(oci_result($stid, 'NOMBRE_PER'));
$persona->setApellido_persona(oci_result($stid, 'APELLIDO_PER'));
$persona->setTipo_persona(oci_result($stid, 'TIPO'));
$persona->setUsuario_persona(oci_result($stid, 'USUARIO'));
$persona->setGenero_persona(oci_result($stid, 'GENERO'));
$persona->setDocumento_persona(oci_result($stid, 'DOCUMENTO'));
}
//echo $persona->getApellido_persona();
return $persona;
}
开发者ID:salcedogeiner,项目名称:Alimentario,代码行数:18,代码来源:PersonaDAO.php
示例13: verBeneficiadoValidado
public function verBeneficiadoValidado()
{
//$condicionxsolicitud=new CondicionxSolicitud();
$beneficiados = array();
$i = 0;
$sqltxt = "SELECT n_nomper, n_apeper, n_correo FROM s_BeneficiarioValidado B, s_Solicitud S, s_Estudiante E, s_Persona P WHERE B.k_idsolicitud = S.k_idsolicitud AND S.k_estudiante = E.k_codigo_est AND E.k_documento = P.k_documento";
$stid = oci_parse($_SESSION['sesion_logueado'], $sqltxt);
oci_execute($stid);
while (oci_fetch($stid)) {
$persona = new Persona();
$persona->setNombre_persona(oci_result($stid, 'N_NOMPER'));
$persona->setApellido_persona(oci_result($stid, 'N_APEPER'));
$persona->setCorreo_persona(oci_result($stid, 'N_CORREO'));
$beneficiados[$i] = $persona;
$i += 1;
}
return $beneficiados;
}
开发者ID:blacburn,项目名称:ApoyoAlimentario,代码行数:18,代码来源:BeneficiadoValidadoDAO.php
示例14: buscarPersonaxDocumento
public function buscarPersonaxDocumento($documento)
{
$persona = new Persona();
echo $documento;
$sqltxt = "select * from s_persona where k_documento = '" . $documento . "'";
$stid = oci_parse($_SESSION['sesion_logueado'], $sqltxt);
oci_execute($stid);
while (oci_fetch($stid)) {
$persona->setDocumento_persona(oci_result($stid, 'K_DOCUMENTO'));
$persona->setNombre_persona(oci_result($stid, 'N_NOMPER'));
$persona->setApellido_persona(oci_result($stid, 'N_APEPER'));
$persona->setUsuario_persona(oci_result($stid, 'N_USUARIO'));
$persona->setTipo_persona(oci_result($stid, 'T_TIPO'));
$persona->setGenero_persona(oci_result($stid, 'N_GENERO'));
$persona->setCorreo_persona(oci_result($stid, 'N_CORREO'));
}
//echo $persona->getApellido_persona();
return $persona;
}
开发者ID:blacburn,项目名称:ApoyoAlimentario,代码行数:19,代码来源:PersonaDAO.php
示例15: buscarFuncionarioxDocumento
public function buscarFuncionarioxDocumento($documento)
{
$funcionario = new Funcionario();
$sqltxt = "select * from s_funcionario where k_documento = " . $documento . "";
$stid = oci_parse($_SESSION['sesion_logueado'], $sqltxt);
//echo $sqltxt;
oci_execute($stid);
while (oci_fetch($stid)) {
//$persona->setCodigo_persona(oci_result($stid, 'CODIGO'));
$funcionario->setId_funcionario(oci_result($stid, 'K_IDFUNCIONARIO'));
$funcionario->setDocumento_funcionario(oci_result($stid, 'K_DOCUMENTO'));
$funcionario->setCargo_funcionario(oci_result($stid, 'N_CARGO'));
}
//echo (string)$estudiante->getCodigo_estudiante();
//echo $estudiante->getCarrera_estudiante();
//echo $estudiante->getMatriculas_estudiante();
//echo $estudiante->getCodigo_estudiante();
//echo $persona->getApellido_persona();
return $funcionario;
}
开发者ID:blacburn,项目名称:ApoyoAlimentario,代码行数:20,代码来源:FuncionarioDAO.php
示例16: insert
/**
* Voer insert uit en return last inserted id
*
* @param string $sequence
* @param bool $commit
* @return int|false $lastId
*/
public function insert($sequence = null, $commit = self::COMMIT)
{
if ($this->statement->getStatementType() != 'INSERT') {
return false;
}
if (empty($sequence)) {
return false;
}
if (!$this->execute($commit)) {
return false;
}
// try to return the currval of the given sequence
$resource = oci_parse($this->statement->getConnectionResource(), "select " . $sequence . ".currval cv from dual");
oci_define_by_name($resource, 'CV', $lastId);
$flag = $commit === true ? OCI_COMMIT_ON_SUCCESS : OCI_DEFAULT;
if (!oci_execute($resource, $flag)) {
return false;
}
oci_fetch($resource);
return $lastId;
}
开发者ID:winkbrace,项目名称:oracle,代码行数:28,代码来源:Executor.php
示例17: displaySchedule
function displaySchedule()
{
$dao = new DAO();
$stmt = oci_parse($dao->con, "SELECT TO_CHAR(TIMESTART, 'MM-DD-YYYY HH24:MI') AS TS ,TO_CHAR(TIMEEND, 'MM-DD-YYYY HH24:MI') AS TE, ID, THEATREID, MOVIEID FROM SCREENROOM");
OCIDefineByName($stmt, "TS", $timeS);
OCIDefineByName($stmt, "TE", $timeE);
OCIDefineByName($stmt, "ID", $scroomID);
OCIDefineByName($stmt, "THEATREID", $tID);
OCIDefineByName($stmt, "MOVIEID", $mID);
oci_execute($stmt, OCI_DEFAULT);
echo '<table border=1>';
while (oci_fetch($stmt)) {
echo '<tr>';
// Use the uppercase column names for the associative array indices
$bookLink = '<a href=order.php?sID=' . $scroomID . '>  book</a>';
$detailLink = '<a href=movieDetail.php?mID=' . $mID . '>  detaile</a>';
echo '<td> MOVIE: ' . $dao->fetchMovieName($mID) . '</td>' . ' <td>Start: ' . $timeS . ' </td><td>End: ' . $timeE . ' </td><td> theatre: ' . $dao->fetchTheatreName($tID) . '</td><td>' . $bookLink . ' </td><td>' . $detailLink . '</td>';
echo '</tr>';
}
echo '</table>';
}
开发者ID:a4501150,项目名称:CS425,代码行数:21,代码来源:movieSchedule.php
示例18: verConvocatoriasActivas
public function verConvocatoriasActivas()
{
$convocatorias = array();
$i = 0;
$sqltxt = "select * from s_convocatoria where fecha_inicio< sysdate AND fecha_fin > sysdate";
$stid = oci_parse($_SESSION['sesion_logueado'], $sqltxt);
oci_execute($stid);
while (oci_fetch($stid)) {
//$persona->setCodigo_persona(oci_result($stid, 'CODIGO'));
$convocatoria = new Convocatoria();
$convocatoria->setId_convocatoria(oci_result($stid, 'ID_CONVOCATORIA'));
$convocatoria->setId_facultad(oci_result($stid, 'ID_FACULTAD'));
$convocatoria->setFecha_inicio(oci_result($stid, 'FECHA_INICIO'));
$convocatoria->setFecha_fin(oci_result($stid, 'FECHA_FIN'));
$convocatoria->setCupos(oci_result($stid, 'CUPOS'));
$convocatoria->setPeriodo(oci_result($stid, 'PERIODO'));
$convocatorias[$i] = $convocatoria;
$i += 1;
}
//echo $convocatoria->getId_convocatoria()."aaaaaaaaaaaaaaaaadwwqqwd";
return $convocatorias;
}
开发者ID:salcedogeiner,项目名称:Alimentario,代码行数:22,代码来源:ConvocatoriaDAO.php
示例19: buscarEstudiantexDocumento
public function buscarEstudiantexDocumento($documento)
{
$estudiante = new Estudiante();
$sqltxt = "select * from s_estudiante where documento = " . $documento . "";
$stid = oci_parse($_SESSION['sesion_logueado'], $sqltxt);
//echo $sqltxt;
oci_execute($stid);
while (oci_fetch($stid)) {
//$persona->setCodigo_persona(oci_result($stid, 'CODIGO'));
$estudiante->setCodigo_estudiante(oci_result($stid, 'CODIGO_EST'));
$estudiante->setDocumento_estudiante(oci_result($stid, 'DOCUMENTO'));
$estudiante->setMatriculas_estudiante(oci_result($stid, 'MATRICULAS_EST'));
$estudiante->setActivo_estudiante(oci_result($stid, 'ACTIVO'));
$estudiante->setCarrera_estudiante(oci_result($stid, 'CARRERA'));
$estudiante->setPromedio_estudiante(oci_result($stid, 'PROMEDIO'));
}
//echo (string)$estudiante->getCodigo_estudiante();
//echo $estudiante->getCarrera_estudiante();
//echo $estudiante->getMatriculas_estudiante();
//echo $estudiante->getCodigo_estudiante();
//echo $persona->getApellido_persona();
return $estudiante;
}
开发者ID:salcedogeiner,项目名称:Alimentario,代码行数:23,代码来源:EstudianteDAO.php
示例20: getRowNbSel
function getRowNbSel($from, $dbcnx)
{
if (!$dbcnx) {
return null;
}
// $req = pg_query($sql_count) or die('echec sql : ' . pg_last_error());
// $req = pg_query($sql_count);
$sql_count = "select count(*) NUMBER_OF_ROWS FROM {$from}";
$req = ociparse($dbcnx, $sql_count);
// oracle
oci_define_by_name($req, 'NUMBER_OF_ROWS', $number_of_rows);
if (!oci_execute($req, OCI_DEFAULT)) {
oci_rollback($dbcnx);
$e = oci_error($req);
print "<pre><font color='red'>" . $e['sqltext'] . ': ' . $e['message'] . '</font></pre>';
$_url = "../index.php?ong=" . $_POST['ong'];
echo "<br><br><b><a href={$_url}>Retour</a></b>";
die;
}
oci_fetch($req);
return $number_of_rows;
}
开发者ID:anisinfo,项目名称:osi,代码行数:22,代码来源:testf.php
注:本文中的oci_fetch函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论