projects
/
misc
/
kostenrechnung
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
7b99851
)
Support LEFT JOINs
author
Joey Schulze
<joey@infodrom.org>
Wed, 24 Mar 2010 13:13:30 +0000
(14:13 +0100)
committer
Joey Schulze
<joey@infodrom.org>
Wed, 24 Mar 2010 13:13:30 +0000
(14:13 +0100)
lib/general.php
patch
|
blob
|
history
diff --git
a/lib/general.php
b/lib/general.php
index
94365d8
..
2332e59
100644
(file)
--- a/
lib/general.php
+++ b/
lib/general.php
@@
-189,10
+189,16
@@
function debug_info()
function grid_sql_join($mask)
{
+ $ret = '';
if (array_key_exists('join', $mask)) {
- return ' JOIN ' . join(' JOIN ', $mask['join']);
+ foreach ($mask['join'] as $line) {
+ if (strtolower(substr($line,0,4)) == 'left')
+ $ret .= ' LEFT JOIN ' . substr($line,5);
+ else
+ $ret .= ' JOIN ' . $line;
+ }
}
- return
''
;
+ return
$ret
;
}
function grid_sql($name, $mask)