Skip to content

cloudk/think-mongo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThinkPHP 5.1 MongoDb驱动

首先安装官方的mongodb扩展:

http://pecl.php.net/package/mongodb

然后,配置应用的数据库配置文件database.phptype参数和query参数为:

'type'   =>  '\think\mongo\Connection',
'query'  =>  '\think\mongo\Query',

即可正常使用MongoDb,例如:

Db::name('demo')
    ->find();
Db::name('demo')
    ->field('id,name')
    ->limit(10)
    ->order('id','desc')
    ->select();

About

mongodb driver for thinkphp

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%