2012-03-23 112 views
0

我想檢索所有評論和喜歡的用戶照片。它不應該是特定的相冊照片。我嘗試過這樣的事情,但沒有奏效。FQL獲取所有評論和喜歡用戶照片

SELECT fromid, user_likes, comments FROM comment 
WHERE object_id IN (
    SELECT object_id FROM photo 
    WHERE aid IN (
    SELECT aid FROM album 
    WHERE owner=me())) 
+0

哪些表結構? – 2012-03-23 13:41:42

+0

表結構?這是關於臉譜,而不是我的具體表格。 – OzBoz 2012-03-23 14:50:44

+0

我的不好。我以爲facebook表格也有結構 – 2012-03-23 14:54:22

回答

2

您可以使用以下查詢:

SELECT fromid, user_likes, **text** FROM comment 
WHERE object_id IN 
( 
    SELECT object_id FROM photo 
    WHERE aid IN ( 
     SELECT aid FROM album WHERE owner=me() 
    ) 
) 
相關問題