/** * *@param $id_ciu * * **/ public function queryByIC($id_ciu) { $this->conex = DataBase::getInstance(); $stid = oci_parse($this->conex, "SELECT * FROM TBL_REPRESENTANTEEMPRESAS WHERE CLV_REPRESENTANTE=:id_ciu"); 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_ciu', $id_ciu); $r = oci_execute($stid); if (!$r) { $e = oci_error($stid); trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); } $result = new RepresentanteEmpresa(); // Obtener los resultados de la consulta while ($fila = oci_fetch_array($stid, OCI_ASSOC + OCI_RETURN_NULLS)) { $it = new ArrayIterator($fila); while ($it->valid()) { $result->__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 $result; }
$empresa->__SET('id_empresa', $id_empresa); $empresa->__SET('rif', $rif); $empresa->__SET('nombre_empresa', $nombre_empresa); $empresa->__SET('direccion_empresa', $direccion_empresa); $empresa->__SET('punto_referencia', $punto_referencia); $empresa->__SET('telefono_empresa', $telefono_empresa); $empresa->__SET('email_empresa', $email_empresa); //Datos del representante de la empresa $id_representante = htmlentities($_POST['cedula_representante']); $nombre_representante = htmlentities($_POST['nombre_representante']); $apellido_representante = htmlentities($_POST['apellido_representante']); $telefono1_representante = htmlentities($_POST['tel_hab_rep']); $telefono2_representante = htmlentities($_POST['tel_mov_rep']); $email_representante = htmlentities($_POST['email_rep']); $direccion_representante = htmlentities($_POST['direccion_patrono']); $representante = new RepresentanteEmpresa(); $representante->__SET('clv_representante', $id_representante); $representante->__SET('str_nombres', $nombre_representante); $representante->__SET('str_apellidos', $apellido_representante); $representante->__SET('str_telefono1', $telefono1_representante); $representante->__SET('str_telefono2', $telefono2_representante); $representante->__SET('str_email', $email_representante); $representante->__SET('str_direccion', $direccion_representante); //DATOS DE LA QUEJA $id_denuncia = htmlentities($_POST['num_den']); $fecha_denuncia = htmlentities($_POST['fecha']); $estatus_denuncia = htmlentities($_POST['estatus']); $descripcion_denuncia = htmlentities($_POST['descripcion']); $responsable_denuncia = htmlentities($_POST['direccion_responsable']); $data = new DenunciaJuridica(); $data->__SET('id_empresa', $id_empresa);