FQL Multiquery返回的信息 [英] FQL Multiquery Returned Info
本文介绍了FQL Multiquery返回的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用FQL Multiquery通过http请求通过一个查询来获取我最近的Facebook问题和选项.
I'm trying to use an FQL Multiquery to obtain my most recent Facebook question and options with one query using an http request.
到目前为止,我尝试使用的查询是:
So far the query I tried to use is:
SELECT name, votes FROM question_option WHERE question_id IN
(SELECT id, question FROM question WHERE owner = me()
ORDER BY created_time DESC LIMIT 1)
不幸的是,这仅返回外部查询的名称和投票,而不返回内部查询的问题和文本.有没有一种方法可以在不进行2个查询的情况下检索全部3个?
Unfortunately this only returns the name and votes from the outer query and not the question text from the inner one. Is there a way to retrieve all 3 without making 2 queries?
推荐答案
您发布的内容不是多查询.适当的多查询应该可以为您提供所需的信息:
What you posted isn't a multiquery. A proper multiquery should get you what you want:
{
'question_detail':
'SELECT id, question FROM question WHERE owner = me()
ORDER BY created_time DESC LIMIT 1',
'question_answers':
'SELECT name, votes FROM question_option WHERE question_id IN
(SELECT id FROM #question_detail)'
}
您需要摆脱空格才能正确执行此操作.
You'll need to get rid of the whitespace for this to properly execute.
这篇关于FQL Multiquery返回的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文