Retrieving a User’s Events with a Specific RSVP
Problem
I need to retrieve a specific user’s event based on their RSVP.
Solution
SELECT eid, rsvp_status FROM event_member WHERE rsvp_status = $status AND uid = $user;
Discussion
There are four possible statuses for event_member
records: attending
, declined
, unsure
, or not_replied
. Keep in mind that this solution
will return events only if the current loggedinuser
is allowed to see them.
Get Facebook Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.