Skip to content

Commit 306b85d

Browse files
committed
minor changes
1 parent 29406a0 commit 306b85d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/Condition.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ class Condition
1010
*/
1111
public function __construct(String $op)
1212
{
13-
$this->op = " " . strtoupper(trim($op)) . " ";
13+
$op = strtoupper(trim($op));
14+
if ($op)
15+
{
16+
$this->op = " " . strtoupper(trim($op)) . " ";
17+
}
18+
else
19+
{
20+
$this->op = "";
21+
}
1422
}
1523

1624
/**

test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
$querySelect->join($join_state);
5151

5252
$querySelect->setWhere(
53-
Condition::init("AND")->add("C.name", "india")
53+
Condition::init("AND")->add("C.name", ["india", 1], "IN")
5454
);
5555

5656
$querySelect->setLimit(10);

0 commit comments

Comments
 (0)