最近项目用到mongodb 的模糊查询,google搜到的方法,记录下Mongodb php 模糊查询 function query(){          $m  = new mongo('127.0.0.1',27017);         $db = $m->selectDB('dbname');          $coll= $db->selectCollection('collname');          $q   = new MongoRegex("/word/");         //调用mongodb 正则   $cursor = $coll->find( array('field' => $q ));         print $cursor->count();  }  
Tags:
Mongodb | 评论(0) | 引用(0) | 阅读(5429)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]