diff options
author | Jamie Matthews <[email protected]> | 2010-10-25 18:37:37 +0100 |
---|---|---|
committer | Jamie Matthews <[email protected]> | 2010-10-25 18:37:37 +0100 |
commit | e305fcaf7446818c7ddd498ca950b0d4fd595570 (patch) | |
tree | 27ef929f816de92599bdec1e26676d90fef1f5f7 /idiorm.php | |
parent | 31558e93f67c17b715741f395699fc902d9bd552 (diff) |
Add inner, left outer, right outer, full outer joins
Diffstat (limited to 'idiorm.php')
-rw-r--r-- | idiorm.php | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -449,6 +449,34 @@ } /** + * Add an INNER JOIN souce to the query + */ + public function inner_join($table, $constraint, $table_alias=null) { + return $this->_add_join_source("INNER", $table, $constraint, $table_alias); + } + + /** + * Add a LEFT OUTER JOIN souce to the query + */ + public function left_outer_join($table, $constraint, $table_alias=null) { + return $this->_add_join_source("LEFT OUTER", $table, $constraint, $table_alias); + } + + /** + * Add an RIGHT OUTER JOIN souce to the query + */ + public function right_outer_join($table, $constraint, $table_alias=null) { + return $this->_add_join_source("RIGHT OUTER", $table, $constraint, $table_alias); + } + + /** + * Add an FULL OUTER JOIN souce to the query + */ + public function full_outer_join($table, $constraint, $table_alias=null) { + return $this->_add_join_source("FULL OUTER", $table, $constraint, $table_alias); + } + + /** * Internal method to add a WHERE condition to the query */ protected function _add_where($fragment, $values) { |