* [misc] add addSelect.
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user