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

where查询语法bug #14

Closed
ghost opened this issue Dec 27, 2017 · 1 comment
Closed

where查询语法bug #14

ghost opened this issue Dec 27, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 27, 2017

$where = [
    'a' => ['>=',10]
];
$where = [
    'b' => ['<=',10]
];

where函数无法使用这种查询语法
报错

<br />
<b>Notice</b>:  Undefined offset: 1 in <b>/data/web/we7-new/viewarticle/vendor/topthink/think-orm/src/db/Builder.php</b> on line <b>375</b><br />
<br />
<b>Fatal error</b>:  Uncaught think\Exception: where express error:0000-00-00 in /data/web/we7-new/viewarticle/vendor/topthink/think-orm/src/db/Builder.php:436
Stack trace:
#0 /data/web/we7-new/viewarticle/vendor/topthink/think-orm/src/db/Builder.php(354): think\db\Builder-&gt;parseWhereItem(Object(think\db\Query), '&gt;=', Array, 'AND', Array)
#1 /data/web/we7-new/viewarticle/vendor/topthink/think-orm/src/db/Builder.php(270): think\db\Builder-&gt;buildWhere(Object(think\db\Query), Array)
#2 /data/web/we7-new/viewarticle/vendor/topthink/think-orm/src/db/Builder.php(959): think\db\Builder-&gt;parseWhere(Object(think\db\Query), Array)
#3 /data/web/we7-new/viewarticle/vendor/topthink/think-orm/src/db/Connection.php(882): think\db\Builder-&gt;select(Object(think\db\Query))
#4 /data/web/we7-new/viewarticle/vendor/topthink/think-orm/src/db/Query.php(2239): think\db\Connection-&gt;select(Object(think\db\Query))
#5 /data/web/we7-new/viewarticle/view.php(51): think\db\Query-&gt;select()
#6 {main}
  thrown in <b>/data/web/we7-new/viewarticle/vendor/topthink/think-orm/src/db/Builder.php</b> on line <b>436</b><br />
@liu21st
Copy link
Member

liu21st commented Dec 27, 2017

不支持了的 参考官方手册

@liu21st liu21st closed this as completed Dec 27, 2017
@ghost ghost mentioned this issue May 21, 2022
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

1 participant