Posted By

eddequincey on 07/22/11

Tagged

mysql sql api twitter

Viewed 8 times

SQL Query to create a table in MySQL to store tweets


/ Published in: SQL

[Query related to PHP code to save tweets from the twitter search API to a MySQL database](http://snipplr.com/view/56994/save-tweets-using-php-from-the-twitter-search-api-to-a-mysql-database/ "PHP code to save tweets from the twitter search API to a MySQL database")

  1. CREATE TABLE `tweets` (
  2. `id` BIGINT(20) NOT NULL,
  3. `created_at` datetime NOT NULL,
  4. `from_user` VARCHAR(100) NOT NULL,
  5. `from_user_id` BIGINT(20) NOT NULL,
  6. `text` text NOT NULL,
  7. `source` text NOT NULL,
  8. `geo` VARCHAR(100) NOT NULL,
  9. `iso_language_code` VARCHAR(10) NOT NULL,
  10. `profile_image_url` VARCHAR(100) NOT NULL,
  11. `to_user_id` BIGINT(20) NOT NULL,
  12. `query` text NOT NULL,
  13. PRIMARY KEY (`id`)
  14. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.