$mongo = new MongoClient('mongodb://');
$db = $mongo->selectCollection("local", "test_data");
$data['num'] = 1439539213873;
$res = $db->insert($data);


> db.test_data.find();
{ "_id" : ObjectId("56b3036931a08a07628b4567"), "num" : 725169713 }





$mongo = new MongoClient('mongodb://');
$db = $mongo->selectCollection("local", "test_data");
//$data['num'] = 1439539213873;
$data['num'] = new MongoInt64('1439539213873');//进行转换
$res = $db->insert($data);


> db.test_data.find();
{ "_id" : ObjectId("56b306c431a08ac80f8b4567"), "num" : NumberLong("1439539213873") }


22 Responses

  1. magnificent points altogether, you just received a logo new reader.
    What would you recommend in regards to your post that you
    made a few days in the past? Any positive?

  2. Hello are using WordPress for your blog platform? I’m new to the blog world but I’m
    trying to get started and set up my own. Do you require any coding knowledge to make
    your own blog? Any help would be greatly appreciated!

  3. If some one needs expert view concerning running a
    blog after that i recommend him/her to pay a visit this blog, Keep
    up the pleasant job.

  4. Attractive section of content. I just stumbled upon your
    blog and in accession capital to assert that I acquire in fact enjoyed account your blog
    posts. Any way I’ll be subscribing to your feeds and even I achievement you access consistently rapidly.

  5. Wonderful items from you, man. I’ve remember your stuff prior to and you are simply too magnificent.
    I actually like what you have acquired here, really like what you’re saying and the way in which through
    which you are saying it. You’re making it enjoyable
    and you continue to take care of to stay it sensible.

    I can not wait to read much more from you. That is actually a terrific web site.

  6. Howdy! I could have sworn I’ve been to this site before but after
    checking through some of the post I realized it’s
    new to me. Nonetheless, I’m definitely delighted I found it and I’ll be
    book-marking and checking back often!

  7. obviously like your website however you need to test the spelling on quite a few of your posts.
    A number of them are rife with spelling problems and I to find it very bothersome
    to tell the truth nevertheless I’ll surely come back again.

  8. An outstanding share! I have just forwarded this onto
    a co-worker who had been conducting a little homework on this.

    And he in fact bought me lunch simply because I stumbled
    upon it for him… lol. So allow me to reword this….
    Thanks for the meal!! But yeah, thanks for spending the time to discuss this matter here on your web page.

  9. I know this if off topic but I’m looking into starting my own weblog and was curious what all
    is required to get setup? I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very internet savvy so I’m not 100% positive. Any
    recommendations or advice would be greatly appreciated.

    Many thanks

  10. Hey there superb blog! Does running a blog such as this take a massive amount work?
    I have very little expertise in coding but I was
    hoping to start my own blog in the near future.
    Anyway, if you have any ideas or techniques for new blog owners please share.
    I know this is off topic nevertheless I just needed to ask.
    Appreciate it!

  11. What’s Happening i’m new to this, I stumbled upon this I
    have discovered It absolutely useful and it has helped me out loads.

    I am hoping to give a contribution & assist different users like its aided me.
    Great job.

  12. Hello there, just became alert to your blog through Google, and found
    that it is really informative. I’m going to watch out for brussels.
    I will appreciate if you continue this in future.
    Numerous people will be benefited from your writing.


电子邮件地址不会被公开。 必填项已用*标注