From 045e51de386e97851324c167620c0eefb91677d1 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 3 Oct 2004 05:59:45 +0000 Subject: [PATCH] Extend select() wrapper to allow specifying multiple tables as an array --- includes/Database.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/Database.php b/includes/Database.php index a032abccbe..c908196033 100644 --- 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 ); -- 2.20.1