Permalink
Browse files

In reguard to #2009, reworked ->_on structure so JP_Query::compile_co…

…nditions() will accept it, also added group methods to ON condition

Signed-off-by: Jordan Shaw <jshaw@janpak.com>
  • Loading branch information...
Jordan Shaw
Jordan Shaw committed Feb 7, 2011
1 parent cfe4b6a commit 7604d9ae1fc64efa286223e89929c4a1f19745c9
Showing with 2 additions and 4 deletions.
  1. +2 −4 classes/kohana/database/query/builder/join.php
@@ -156,7 +156,7 @@ public function compile(Database $db)
$sql .= ' USING ('.implode(', ', array_map(array($db, 'quote_column'), $this->_using)).')';
}
else{
- $sql .= $this->_compile_conditions($db, $this->_on);
+ $sql .= ' ON ' . $this->_compile_conditions($db, $this->_on);
}
@@ -232,10 +232,8 @@ protected function _compile_conditions(Database $db, array $conditions)
$last_condition = $condition;
}
}
-
- return $sql;
}
-
+
/**
* Creates a new JOIN statement for a table. Optionally, the type of JOIN
* can be specified as the second parameter.

0 comments on commit 7604d9a

Please sign in to comment.