Re: My First Function

From: "omid omoomi" <oomoomi(at)hotmail(dot)com>
To: gary(dot)stainburn(at)ringways(dot)co(dot)uk, pgsql-sql(at)postgresql(dot)org
Subject: Re: My First Function
Date: 2001-07-01 16:39:51
Message-ID: F194zSgDvai2RJ8m4ZQ0001b6eb@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-07-01 19:21:30 WAL_FILES?
Previous Message Gary Stainburn 2001-07-01 15:30:07 My First Function