>
>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.