Twitter oauth从std对象类获取frnds并使用mysql数据库进行检查

时间:2013-06-18 00:32:54

标签: php mysql twitter oauth

我正在使用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等等。

任何帮助将不胜感激

0 个答案:

没有答案