Php 锂的独特选择
使用Lithiums模型,如何从MongoDB中的集合中获得特定字段的不同结果集 mongo查询:Php 锂的独特选择,php,mongodb,lithium,Php,Mongodb,Lithium,使用Lithiums模型,如何从MongoDB中的集合中获得特定字段的不同结果集 mongo查询: db.blogs.distinct('url'); 据我所知,目前还没有一种方法可以优雅地做到这一点。可以通过直接使用对象获得结果。命令功能允许您拨打任何需要的电话 $db = Connections::get('default'); $blogs = $db->connection->command(array('distinct'=>'blogs', 'key'=>'
db.blogs.distinct('url');
据我所知,目前还没有一种方法可以优雅地做到这一点。可以通过直接使用对象获得结果。
命令
功能允许您拨打任何需要的电话
$db = Connections::get('default');
$blogs = $db->connection->command(array('distinct'=>'blogs', 'key'=>'url'));
终于有锂用户了!但为什么要使用Mongo?