Skip to content

Instantly share code, notes, and snippets.

@cognitom
Created March 9, 2012 17:47
Show Gist options
  • Select an option

  • Save cognitom/2007729 to your computer and use it in GitHub Desktop.

Select an option

Save cognitom/2007729 to your computer and use it in GitHub Desktop.
SELECT
creator,
description,
eid,
end_time,
event_subtype,
event_type,
hide_guest_list,
host,
location,
name,
nid,
pic,
pic_big,
pic_small,
privacy,
start_time,
tagline,
update_time,
venue
FROM event
WHERE (
eid in (
SELECT eid
FROM event_member
WHERE uid = {page_id} AND start_time>0
)
OR eid IN (
SELECT eid
FROM event_member
WHERE uid = ME() AND start_time>0 AND rsvp_status = 'attending'
)
)
AND privacy = 'OPEN'
ORDER BY start_time DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment