Home  >  Article  >  php教程  >  Mongo 'OR' 增强

Mongo 'OR' 增强

WBOY
WBOYOriginal
2016-06-07 11:44:401143browse

当前DbMongo.class.php中对于Mogo查询的OR处理只是支持,单个字段的OR.
比如“name='abc' OR name='ccc'"--->请自行转义成Mongo,find.
改进后,支持name='abc' OR email='a@cn.cn'。

虽不说一直关注TP.但是也有一段时间了
重要的是,一直没贡献过。

头次贡献,鄙陋之处,还望指出,共同学习!


这两天一直在尝试Mogon.没管Mysql数据库啥的。估计如果要这样支持,改发也是一样的。



将代码直接覆盖原有
DbMongo.class.php。即可

附件 DbMongo.class.zip ( 5.36 KB 下载:40 次 )

AD:真正免费,域名+虚机+企业邮箱=0元

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn