We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27e8263 commit ab034b4Copy full SHA for ab034b4
Chimera/Storage/MySQL/Query.php
@@ -83,15 +83,19 @@ public function sql() {
83
$where = '';
84
if (!empty($this->_conditions)) {
85
$where = 'WHERE ';
86
- foreach ($this->_conditions as $set) {
+ foreach ($this->_conditions as $k => $set) {
87
$placeholders = array();
88
foreach ($set['conditions'] as $key => $value) {
89
- $placeholders[] = " $key=? ";
+ $op = '=';
90
+ if (is_array($value)) {
91
+ $op = $value[0];
92
+ $this->_conditions[$k]['conditions'][$key] = $value[1];
93
+ }
94
+ $placeholders[] = " {$key}{$op}? ";
95
}
96
$where .= '(' . join($set['type'], $placeholders) . ')';
97
98
-
99
$limit = '';
100
if (!empty($this->_limit)) {
101
$limit = 'LIMIT '
0 commit comments