无法将BSON文档转换为PHP变量

时间:2017-02-13 10:36:38

标签: php mongodb laravel-5.2

我在laravel编写了mongoDB查询,

     $pipeline = array(
            array(
                '$match' => array(
                    '$and' => array(
                        array('CID' => '000001'),
                        array('ID' => 'C00001'),
                    )
                )
            )
        );

        $result=  mongodb_connection_new("NP_Segment",$pipeline);

我的其他查询正在使用数据正确响应,但是为了从集合中获取以下数据,上面的查询给出了错误。 收集中的数据

   { 
    "_id" : ObjectId("589dd9ac7ffbe03495c2dbd7"), 
    "ID" : "C00001", 
    "CID" : "000001", 
    "MinTs" : ISODate("2017-02-10T20:47:37.000+0000"), 
    "MaxTs" : ISODate("2017-02-10T21:19:46.000+0000"), 
    "value" : [
        {
            "IP" : "10.179.158.202", 
            "From" : "PANEL", 
            "To" : "CAMS", 
            "RDt" : ISODate("2017-02-10T21:19:46.000+0000"), 
            "CDt" : ISODate("2017-02-10T15:49:52.312+0000"), 
            "Status" : "", 
            "MacID" : "031R", 
            "HexMsg" : "\n�E0210\"SIA-DCS\"0110R000001L000001#C00001[C00001|NYY0032|031R|032R|033U|034U|035R|036R|037U|038U|039U|040U|041U|042U|043U|044U|045U|046U|047U|048U|049U|050U|051U|052U|053U|054B|055U|056R|057U|099R]_21:19:46,10-02-2017\r", 
            "HexReply" : "\n��0032\"ACK\"0110R000001L000001#C00001[]\r", 
            "ZoneNo" : "", 
            "ID" : ""
        }
    ]
}

错误:无法将BSON文档转换为PHP变量

0 个答案:

没有答案