Skip to content

Commit

Permalink
Merge pull request #53 from imsole/master
Browse files Browse the repository at this point in the history
Repair JOIN Function SQL Statement Splicing Error
  • Loading branch information
izniburak authored Dec 23, 2018
2 parents 142434a + 9fa3b49 commit 8f3f095
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Pdox.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ public function join($table, $field1 = null, $op = null, $field2 = null, $type =
$table = $this->prefix . $table;

if (! is_null($op)) {
$on = (! in_array($op, $this->op) ?
$this->from . '.' . $field1 . ' = ' . $table . '.' . $op :
$this->from . '.' . $field1 . ' ' . $op . ' ' . $table . '.' . $field2);
$on = ( !in_array($op, $this->op) ? $field1 . ' = ' . $op : $field1 . ' ' . $op . ' ' . $field2 );
}

if (is_null($this->join)) {
Expand Down

0 comments on commit 8f3f095

Please sign in to comment.