Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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;
 }