0

If I put this line $friends = $connection->get('followers/ids', array('screen_name' => '2020volt')); Twitter api returns something like this :

Array
(
    [0] => 173605790
    [1] => 187372244
    [2] => 17535566
    [3] => 190756198
    [4] => 184577861
    [5] => 119247538
    [6] => 183813521
    [7] => 18013082
    [8] => 149601084
    [9] => 186491393
    [10] => 19263381
    [11] => 208430904
    [12] => 25987409
    [13] => 44706902
    [14] => 198088252
)

Problem : My task is finding out how many (and who as well) of your followers are subscribed to my site. I built a database of the subscribers. But now I need to know the proper query to get this task done.

select * from users where twitter_id = "Its your task mates :) just show me a way to query all the ids, got returned from twitter" and status = "1"

I think you already got what I'm asking for. I want to make a query with all the ids belongs to that array to see if any of your twitter friend is already our subscriber.

Thanks In Advance

Edited by TechySafi: n/a

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by TechySafi
0

try:

$sql="select * from users where twitter_id IN (" . implode(',',$friends) . ") AND status=1";
$result=mysql_query($sql) or die( mysql_error() );

$total=mysql_num_rows( $result );
0

try:

$sql="select * from users where twitter_id IN (" . implode(',',$friends) . ") AND status=1";
$result=mysql_query($sql) or die( mysql_error() );

$total=mysql_num_rows( $result );

yeah, it works pretty fine! Thanks once again !! Simple & quick answer :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.