Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.x 版本查询条件 非 limit=1时 结果不符合预期 #3

Open
jianhuihi opened this issue Sep 27, 2020 · 2 comments
Open

3.x 版本查询条件 非 limit=1时 结果不符合预期 #3

jianhuihi opened this issue Sep 27, 2020 · 2 comments

Comments

@jianhuihi
Copy link

jianhuihi commented Sep 27, 2020

$collection = $mongo->database('supsite')->collection('data_article');
$data          = $collection->find(['siteid' => $siteid], ['skip'=>0,'limit'=>15]);
var_dump(count($data));

collection 实际570条数据 limit = 1 时查出的数据正常 但limit 15 return 了全部数据 570

@Reasno
Copy link
Owner

Reasno commented Sep 27, 2020

@jianhuihi
Copy link
Author

mongodb 3.6+ case可以全部通过

3.2 部分通过

3.0 limit没通过

@Reasno Reasno changed the title 查询条件 非 limit=1时 结果不符合预期 3.x 版本查询条件 非 limit=1时 结果不符合预期 Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants