Re: My First Function

Поиск
Список
Период
Сортировка
От omid omoomi
Тема Re: My First Function
Дата
Msg-id F194zSgDvai2RJ8m4ZQ0001b6eb@hotmail.com
обсуждение исходный текст
Ответ на My First Function  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
Ответы Re: My First Function  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
Список pgsql-sql
>
>I want to be able to pass a member ID and a function ID and return the
>highest permission for the two.  The cut-down schema is:
>
Hello ,
Perhaps this SQL works for you:

select PPID,Max(PPERM)
from permtable
where
PFID = 'FUNCTION_ID'
and
PPID in ( select HPID from holdertable where HMID='MEMBER_ID' )
group by PPID;

You will face some problems returning more than one value from this SQL if 
using it in a function.
Though,I believe if you are going to use a PHP script it can easilly be 
handled with it.

Hope that helps
Omid Omoomi
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.



В списке pgsql-sql по дате отправления:

Предыдущее
От: Gary Stainburn
Дата:
Сообщение: My First Function
Следующее
От: "Josh Berkus"
Дата:
Сообщение: WAL_FILES?