diff --git a/lib/sqlparser/sqlparser.class.php b/lib/sqlparser/sqlparser.class.php index f739a00df5..03f9ec63c2 100644 --- a/lib/sqlparser/sqlparser.class.php +++ b/lib/sqlparser/sqlparser.class.php @@ -137,6 +137,26 @@ class sqlparser $this->statement->from = array($from); } + /** + * Add select. + * + * @param array|object $exprs + * @access public + * @return void + */ + public function addSelect($exprs) + { + if(empty($exprs)) return; + + if($exprs instanceof PhpMyAdmin\SqlParser\Components\Expression) + { + $this->statement->expr[] = $exprs; + return; + } + + foreach($exprs as $expr) $this->addSelect($expr); + } + /** * Get function. *