You are here

function twitter_tweets in Twitter 6.5

Same name and namespace in other branches
  1. 7.6 twitter.inc \twitter_tweets()
  2. 7.5 twitter.inc \twitter_tweets()

Pulls tweets from the database.

Parameters

string $screen_name: Optionally provide a screen_name to filter.

1 call to twitter_tweets()
theme_twitter_user_accounts in ./twitter.module
Default callback for theme('twitter_user_accounts');

File

./twitter.inc, line 362

Code

function twitter_tweets($screen_name = NULL) {
  if (empty($screen_name)) {
    $result = db_query('SELECT * FROM {twitter}');
  }
  else {
    $result = db_query("SELECT * FROM {twitter} WHERE screen_name = '%s'", $screen_name);
  }
  $tweets = array();
  while ($row = db_fetch_object($result)) {
    $tweets[] = $row;
  }
  return $tweets;
}