FQL:如何在fql语句中使用数组?

时间:2012-10-07 01:52:05

标签: arrays facebook-fql

如何在下面的行中使用数组而不是$ id

$fql = "SELECT uid, rsvp_status FROM event_member WHERE eid=" . $id;

所以它变得像:

$array[0] = "12345678";
$array[1] = "87654321";
$fql = "SELECT uid, rsvp_status FROM event_member WHERE eid=" . $array;

1 个答案:

答案 0 :(得分:1)

您想使用in运算符:

$array[0] = "12345678";
$array[1] = "87654321";
$fql = "SELECT uid, rsvp_status FROM event_member WHERE eid in (".
       implode(',', $array). 
       ")";