fql join; can i join two tables with FQL?

后端 未结 2 1863
-上瘾入骨i
-上瘾入骨i 2021-01-03 08:34

I have the following FQL I want to join with user table to add name field! How can I do that?After I test making normal left join I got error message (601 join not possible

2条回答
  •  萌比男神i
    2021-01-03 08:59

    Do something like this:

    FB.api({
        method: 'fql.multiquery',
        queries: {
            'query1': 'SELECT uid2 FROM friend WHERE uid1 = me()',
            'query2': 'SELECT vid, owner, title, description FROM video WHERE owner IN (SELECT uid2 FROM #query1)'
        }
    },
    function(response) {
        // response should have 2 objects in it, both containing an fql_result_set 
        // array with the data and the name you entered for the query (i.e. 'query1')
        alert('Photos: ' + JSON.stringify(response));
    });
    

提交回复
热议问题