Toggle navigation
Toggle navigation
This project
Loading...
Sign in
web
/
hood
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
ziy
2015-06-15 21:50:24 +0800
Commit
6ec9ba8016426c5f1d13e77cadd3021b1b464021
1 parent
0eaad1a2
1、修改文档
2、修改返回插入ID方法名
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
Hood/Dao/MongoDB/MongoResult.php
Hood/Dao/MongoDB/README.md
Hood/Dao/MongoDB/MongoResult.php
View file @
6ec9ba8
...
...
@@ -18,7 +18,7 @@ class MongoResult
return
$this
->
__get
(
'_id'
)
->
__toString
();
}
public
function
lastInsert
Object
()
public
function
lastInsert
MongoID
()
{
return
$this
->
__get
(
'_id'
);
}
...
...
Hood/Dao/MongoDB/README.md
View file @
6ec9ba8
...
...
@@ -10,12 +10,17 @@
### 添加数据并获取状态
```
php
$status = DB::Mongo()->collection('loggers','coupons')->insert(array('a'=>1))->getStatus();
原生返回状态数据
->getStatusData()
```
###添加数据并获取插入的ID
```
php
$id = DB::Mongo()->collection('loggers','coupons')->insert(array('a'=>1))->lastInsertId();
原生插入返回ID对象
->lastInsertMongoID()
```
###分页显示
...
...
Please
register
or
login
to post a comment