php-mongodb

    2热度

    1回答

    我无法连接到副本集。 [MongoDB\Driver\Exception\ConnectionTimeoutException] No suitable servers found (`serverSelectionTryOnce` set): [Server closed connection. calling ismaster on '

    0热度

    2回答

    我已经使用MongoDB3.0与PHP版本5.3.5和PHP驱动程序版本1.1.4。我试图插入记录收集我得到致命错误类蒙戈客户端没有发现那位 insert.php <?php // connect to mongodb $m = new MongoClient("mongodb://localhost:27017"); echo "Connection to dat

    0热度

    1回答

    我在PHP中使用蒙戈DB驱动程序类像 public function fetchStudentsForBroadcast() { $this->collection = $this->db->studentTbl; $batch = (int)$this->batch; $course = $this->course; $year = $this-

    0热度

    1回答

    我试图实施原则ODM。我正在走宝贝步,但我一直在打路障。这是许多路障的一个迄今: PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "Manager" from namespace "MongoDB\Driver". 当我这样做:

    0热度

    1回答

    我有一个地理空间查询像Follwing查询。这个查询返回4条记录..我想帧PHP db.master.find({ location: { $geoWithin: { $centerSphere: [ [ 94.60867254, 27.54018825 ], 10/6378.1 ] } } }) 以下查询如何框上方的查询在PHP?并得到结果?

    0热度

    1回答

    老司机有数据类型的包装MongoInt32(),MongoInt64() 如何specifiy在新moongodb司机int lenght? http://php.net/manual/en/set.mongodb.php

    0热度

    2回答

    我想创建一个网站使用MongoDB存储用户凭据(用户名和密码)。我想使用PHP,因为我对它很熟悉,但是在这方面几乎所有的语法背后都有问题(由于更新了php-mongodb驱动程序)。是否有任何在线资源可以提供帮助,特别是添加和删除数据库中的信息?任何信息非常感谢。

    2热度

    2回答

    我必须使用Mongodb和PHP,并试图从使用PHP的mongocollection获取数据。用php返回记录的下面的mongoquery成功。但我想为以下查询设置限制。 PHP代码: $query = array("\$and"=>array(array('fld'=> array("\$in"=> array('4', '14', '20'))), array('stat'=>array("\

    0热度

    1回答

    当我尝试在PHP中执行MongoDB查询时出现错误。 Parse error: syntax error, unexpected T_DOUBLE_ARROW in fiename.php on line 55 $findCount = array("$group" => (_id => "$createdby", count => ($sum:1))); //Line 55 $cursor =

    0热度

    1回答

    我在EC2上有三个实例,每个实例都有服务mongo,设置了副本集,即主副本(192.168.1.1),副主副本(192.168.1.2 )和仲裁者(192.168.1.3)。 我有几个应用程序连接到mongo。 我的问题如下: 如果我在副本添加其他成员,我不得不改变在连接设置中的所有应用程序,包括新成员? 因为我问了。 假设ip以final .1为主,.2为secondary,然后添加一个新成员到