There are 2 tables: functions and rights. "Functions" has all of the
possible security validations that are implemented in the software, and
"Rights" are the actual rights for given roles. The functions table
has perhaps 100 records, and currently there's only 4 records in the
rights table. Yet this query below only returns 4 records. Shouldn't
it return a full set from the Functions table and the matching rows from
the Rights table?
select f1.cfuncname, ifnull(r1.crights,'11') as crights
from functions f1
left join rights r1
on f1.iid = r1.ifunctionid
where r1.cclient = 'TRIAL' and r1.iroleid = 1
Here's the schematic of both tables:
Column Information For - Functions
Field Type Null Key Default Extra
------------ ----------- ------ ------ ------- --------------
iid int(11) PRI (NULL) auto_increment
cdescription varchar(64)
cfuncname varchar(32) UNI
igroupid smallint(6) 0
Column Information For - rights
------------------------------------------------------------------------------------------------------------
Field Type Null Key Default Extra
----------- ----------- ------ ------ ------- --------------
iid int(11) PRI (NULL) auto_increment
cclient varchar(16)
iroleid int(11) 0
ifunctionid int(11) 0
crights char(2) 11
--
Michael J. Babcock, MCP
MB Software Solutions, LLC
http://mbsoftwaresolutions.com
http://fabmate.com
"Work smarter, not harder, with MBSS custom software solutions!"
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.