0

我正在使用 abarahams oauth,我已经能够像这样检索 std 类对象

 stdClass Object
 (
    [ids] => Array
    (
        [0] => 15761916
        [1] => 30144785
        [2] => 382747195
        [3] => 19399719
        [4] => 15962388
        [5] => 119513889
        [6] => 18286505
        [7] => 74829153
        [8] => 20536157
        [9] => 29877699
        [10] => 242314486
        [11] => 17813899
        [12] => 18931678
        [13] => 27791181
        [14] => 13049362
        [15] => 21845792
        [16] => 136361303
        [17] => 50184013
        [18] => 169686021
        [19] => 22733444
        [20] => 30543716
        [21] => 338084918
        [22] => 18182384
        [23] => 16213342
        [24] => 5988062
        [25] => 127640187
        [26] => 181835231
        [27] => 244189163
        [28] => 38919338
        [29] => 66644574
    )

[next_cursor] => 0
[next_cursor_str] => 0
[previous_cursor] => 0
[previous_cursor_str] => 0
 )
all these array value reside in a php variable $following

我想执行一个 mysql 查询来检查是否值并查看我的数据库示例中是否有匹配项

  mysql_query( " Select id from user where oauth = '$following->ids[$i]'  ");

返回我的用户网站 ID。我希望我的数据库中所有具有 oauth id 的现有用户都被拉出并放入一个数组中。我曾尝试使用 mysql_fetch assoc 但如果给定资源 id #1,2 等。

任何帮助,将不胜感激

4

0 回答 0