1

如何在下面的行中使用数组而不是 $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;
4

1 回答 1

1

您想使用in运算符:

$array[0] = "12345678";
$array[1] = "87654321";
$fql = "SELECT uid, rsvp_status FROM event_member WHERE eid in (".
       implode(',', $array). 
       ")";
于 2012-10-07T01:58:32.800 回答