EDIT: it turns out it's NOT a problem.. pfew! phpMOadmin is not able to display the bigint (probably server apache settings i didn't care).. not mongoDB is unable to save... u.kodingen.com/1fMs5Z i requested from CLI, and it comes back just fine! sorry mongodb.
when i insert tweet to mongodb, it's id e.g. 16906830606 becomes -274549723
our servers are 64bits, I use php mongo driver.
this is the full insert code,
$content = file_get_contents("http://search.twitter.com/search.json?q=worldcup");
$decoded = json_decode($content,true);
$c = new Mongo("mongodb://x:[email protected]:27017");
foreach($decoded['results'] as $tweet)
{
$tweet['_id'] = $tweet['id'];
$c->db->tweets->insert($tweet);
}
This is how it saves: http://u.kodingen.com/1fKw6E
If I force it as String,
$tweet['_id'] = "" . $tweet['id'];
then it's correct: http://u.kodingen.com/1fKy8g
I want to know why this happens, and what else I should be worried about MongoDB while you are at it :) just starting out here..