Hi there
I have 2 tables related,
first = WBF_EVN_evn_event(keeps all event records),
second = WBF_EVN_ptc_participant(keeps all records related to participants)
I'm trying to get all events which the current user has not attended or not replied(if ptc_pts_id = 2 then the participant has not attended OR I want to see also where ptc_pts_id is NULL)
SELECT evn_id, evn_name, evn_date_start, evn_date_end, ptc_pts_id, ptc_usr_id
FROM WBF_EVN_evn_event
LEFT OUTER JOIN WBF_EVN_ptc_participant ON evn_id = ptc_evn_id
WHERE evn_deleted = 0
AND (ptc_pts_id is NULL or (ptc_pts_id = 2 AND ptc_usr_id = 24 ) )
AND evn_dom_id = 1
With this query I get up to some point good result;if there is no other
View Complete Post