I'm trying to create a function in php that brings information from my Oracle database, but the function does not return any value. This function is meant to return some user data.
The function is as follows:
<?php
function fn_valida_permissao() {
include ("../../DataBase/conexao.php");
$chamado_query = "SELECT pu.idusuario IDUSUARIO
FROM usuario u
WHERE u.idusuario = upper('usuario_de_acesso')";
$chamado = oci_parse($ora_conexao, $chamado_query);
oci_execute($chamado);
while($v_pagina=oci_fetch($chamado)) {
return $v_pagina = oci_result($chamado, 'IDUSUARIO');
}
}
?>
Would anyone have any suggestions on how to solve?