Обсуждение: RETURN in function

Поиск
Список
Период
Сортировка

RETURN in function

От
Uros Gruber
Дата:
Hi!

I wan't to know how to use SET type in RETURNING from function.

I have some function and i want to return 2 values. 1 value is return
code and other is some ID if return code is for example 1.

For example:

Function checks users data. Return code is possible like 1 for
everything is OK and 0 for error. But other value can be like ID is
return code is 1, but if return code is 0 i want to return also what
error is this.

I tried with REISE NOTICE, but this i can't use in PHP (or am I,
please give me example), so i want return 2 values. I tried to use

CREATE FUNCTION ... RETURNS SET AS .... but i have syntax error near
SET.


I hope everybody understands me what i want to know. Thanks for help
--
bye,
 Uros