0
I have a repetitive process in BD that is validate the user for each request, so I decided to create a process for this and call inside the others when necessary. However I have the need to save the return of the past this time. But I cannot allocate the value to any variable at all. I even tried to put in an if and it didn’t work out. I don’t know much back, someone can help me?
CREATE DEFINER=`root`@`localhost` PROCEDURE `getmnhsInfo`(in tokn text)
foo:BEGIN
set @verific = verificaToken(tokn);
if (@verific is null) then
select tokn; -- para testar o retorno, a procedure está incompleta
end if;
select @verific; -- para testar o retorno, a procedure está incompleta
END
And the error message is as follows:
Error Code: 1305. FUNCTION wmp_fut.verificaToken does not exist -- Se eu não coloco call, ele entende como uma função
Note: if I put 'call' in front it does not save with a variable together. It calls Procedure, executes it, but does not accept allocating the return to a variable.
Would you not want to create a
FUNCTION
and not aPROCEDURE
?– anonimo
Exactly! Thank you
– Wan