/ Published in: PHP
[Related SQL query to create the storage table](http://snipplr.com/view/56995/sql-query-to-create-a-table-in-mysql-to-store-tweets/ "Related SQL query to create the storage table")
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $q = $_GET["q"]; // query string if($jsonobj != null){ if (!$con){ } foreach($jsonobj->results as $item){ $id = $item->id; $created_at = $item->created_at; $from_user_id = $item->from_user_id; $geo = $item->geo; $iso_language_code = $item->iso_language_code; $to_user_id = $item->to_user_id; if($to_user_id==""){ $to_user_id = 0; } // SQL query to create table available at http://snipplr.com/view/56995/sql-query-to-create-a-table-in-mysql-to-store-tweets/ $query = "INSERT into tweets VALUES ($id,'$mysqldate','$from_user',$from_user_id,'$text','$source','$geo','$iso_language_code','$profile_image_url',$to_user_id,'$q')"; } } ?>