Well, I thought that worked - and it largely did with one problem.

If I had a record with my ID (I'm 3) then it found the record.  If someone else 
had a record shared with me, then it found the record - both yays.  
Unfortunately, if I have my note shared with four people, then I see it four 
times in my search.  Otherwise, it's doing all that I want.  I guess that this 
is because it's making the four shared entries into full entries, but it seems 
like it should work to me.
I am far beyond my DB capabilities at this point.

Here are the two relevant tables:
http://hhp.umd.edu/home/db_display.cfm
http://hhp.umd.edu/home/db_display_shared.cfm

My test record is n_r_id 341.

Here's the outputted queryResult:
SELECT n.meeting_name,n.type,n.note_date,n.notes,n.type_describe FROM 
notes_to_the_record n LEFT OUTER JOIN notes_to_the_record_shared s ON n.n_r_id 
= s.n_r_id WHERE (n.ID = 3 OR s.id = 3 ) AND (1=1 ) ORDER BY 
UPPER(n.meeting_name) ASC

>I think what you really want is something like this:
>
>SELECT n.meeting_name,n.type,n.note_date,n.notes,n.type_describe
>FROM notes_to_the_record n LEFT JOIN notes_to_the_record_shared s on
>n.n_r_id = s.n_r_id
>WHERE
>      n.ID = #session.user.id# OR
>      s.id = #session.user.id#
>ORDER BY UPPER(n.meeting_name) ASC

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267727
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to