簡単なクエリを作成する必要があります
$array_of_ids = array();
//poulate $array_of_ids, they don't come from another db but from Facebook
//so i can't use a subquery for the IN clause
$wpdb->prepare("SELECT id from table where id IN (%d, %d)", $array_of_ids [0], $array_of_ids [1]);
問題は、配列に 200 個の要素がある場合、これを処理する正しい方法は何ですか?200 でクエリを手動で作成する必要があります%d
か? データベースをFacebookデータと「同期」する必要があり、データベースにあるユーザーが存在するかどうかを確認し、存在するユーザーを更新し、新しいユーザーを挿入し、友達ではないユーザーを削除する必要があるため、このクエリが必要です。