[1961] in Moira

home help back first fref pref prev next nref lref last post

Re: calendar.gen

daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Thu May 16 00:44:53 2002

Message-Id: <200205160444.AAA03563@riff-raff.mit.edu>
To: Mark Silis <mark@MIT.EDU>
cc: Jonathon Weiss <jweiss@MIT.EDU>, moiradev@MIT.EDU
In-Reply-To: Your message of "Thu, 16 May 2002 00:08:13 EDT."
             <20020516040813.GA24226@I-fear-reorgs.MIT.EDU> 
Date: Thu, 16 May 2002 00:44:51 -0400
From: Garry Zacheiss <zacheiss@MIT.EDU>

	This looks better.

>> +$sth = $dbh->prepare("SELECT u.clearid, u.login, u.first, u.middle, u.last " .
>> +		     "FROM users u, list l, imembers i " .
>> +		     "WHERE l.name = 'calendar-acl' " .
>> +		     "AND l.list_id = i.list_id AND l.list_id = i.list_id " .
>> +		     "AND i.member_type='USER' AND i.member_id = u.users_id")
>> +    || exit $MR_DBMS_ERR;
>> +$sth->execute || exit $MR_DBMS_ERR;

   You might want this to be a SELECT UNIQUE, since you're not checking
the direct column in the imembers table.  As things stand now, if you
had a user directly on calendar-acl and also indirectly a member (by
being on a list that's on calendar-acl), you'd get two rows returned
from your select for that user, which might be a problem for your
application.

Garry

home help back first fref pref prev next nref lref last post