Facebook -- best way to do FQL "join" with event and event_member? -


In a Facebook app, I need to get user date for each event and its RSVP status .

I can fix user incidents, but at the moment I am looking at RSVP status for every incident at one time, and the time is time for programs with a large number of people.

I am getting user events like this:

  $ fql = "select eid, name, start_time, end_time From event WHERE EID in (event_member WHERE UID = $ user from SELECT eid) and start_time & gt; '$ timestamp' by start_time "ORDER";  

This part is working fine.

And here's how I am getting RSVP status for each event, one at a time:

  $ Fql = "selection rsvp_status from event_member where UID = $ user and id = '$ event_id'";  

This works fine even on the basis of event-by-event, but the time of the app page is when the user has many events, because every event Is seen.

With the usual SQL, I could easily do so with this included, but FQL is not allowed to join.

A possible solution is to loop through each RSVP_Status probability in batches, like this:

  $ fql = "Select EID, name, start_time, end_time event WHERE eid in (SELECT eid FROM event_member WHERE UID = $ user and RSVP_stattu = 'present') and start_time & gt; '$ timestamp' ORDER by start_time";  

This minimizes the number of RQFPC (three I think), but ideally I want to do it in an FQL call.

There is no way to get involved, but you can batch your 4 questions in one call Can use for There will be 1 for every 4 questions: present, uncertain, disapproved, and not_published.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -