dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecce020
)
Extend select() wrapper to allow specifying multiple tables as an array
author
Brion Vibber
<brion@users.mediawiki.org>
Sun, 3 Oct 2004 05:59:45 +0000
(
05:59
+0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Sun, 3 Oct 2004 05:59:45 +0000
(
05:59
+0000)
includes/Database.php
patch
|
blob
|
history
diff --git
a/includes/Database.php
b/includes/Database.php
index
a032abc
..
c908196
100644
(file)
--- a/
includes/Database.php
+++ b/
includes/Database.php
@@
-518,10
+518,13
@@
class Database {
if ( is_array( $vars ) ) {
$vars = implode( ',', $vars );
}
- if ($table!='')
+ if( is_array( $table ) ) {
+ $from = ' FROM ' . implode( ',', array_map( array( &$this, 'tableName' ), $table ) );
+ } elseif ($table!='') {
$from = ' FROM ' .$this->tableName( $table );
- else
+ } else {
$from = '';
+ }
list( $useIndex, $tailOpts ) = $this->makeSelectOptions( $options );