I want to combine the results of status_id returned from status table http://wiki.developers.facebook.com/index.php/Status%5F%28FQL%29 and comments from stream http://wiki.developers.facebook.com/index.php/stream%5F%28FQL) to retrieve comments for a user (in a single multiqery maybe)
Something along the lines of:
query1:Select status_id from status where uid= order by time desc limit 1, query2: select message from stream where post_id = _#query1
(Stream's postID is a combo of a user's UID and status tables status_id) - I really don't want to run 2 FQL queries for this (to avoid bad performance)
I found they have a concat(string,...) function but I can't get it to run.. http://wiki.developers.facebook.com/index.php/Functions%5Fand%5FOperators
For the curious, the reason I am trying to do this is because till yesterday this was working:
SELECT post_id, message, source_id, attachment, likes, comments FROM stream WHERE filter_key='nf' AND attachment='' AND source_id= ORDER BY updated_time limit 1
This returned the lastest status message of the user with uid - this is as per the this doc: http://wiki.developers.facebook.com/index.php/Stream%5F%28FQL%29 - "To determine what sort of post gets returned, look for the presence of an attachment (lack of an attachment indicates a status update)"
Today, I can see that the attachment array has an additional description field:
[attachment] => Array ( [description] => )
So I need to do this to make sure I get the correct result (lot's of other posts have description="" so using the condition "attachment.description=''" does not help either