English 中文(简体)
如何在Facebook FQL 上进行内部连接
原标题:How to do an inner join on Facebook FQL

Ok, so I m querying two FQL tables: Events and event_members. On one query I get all events from the user and his friends (let s call this $events), and on the other query I get all the members attending to all those events (let s call it $attendingmembers). Both queries are returned as arrays on php, and as you may already know FQL doesn t allow INNER JOINS.

我想做的是“调整”数据, 这样我就可以同时加入结果, 并获得一个单一的阵列, 包含所有事件的细节和参加活动的人数。 两个阵列都有一个共同的“ 关键 ” : eid 。

在Sql上,这很容易,但是在FQL上,没有内部加入,所以我想我应该做连线插座,用阵列的中间部分来做类似的事情,但我无法找到办法。

帮助是感激不尽的!

问题回答

内部连接不会给您出席的人数。 计算会。 而且, 这不是“ 标准化” 的数据, 将它看成是混乱的 。

要用一种编程语言(如PHP)做到这一点,每次发现元素时要通过阵列和递增一个计数器。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签