+ [misc] add parseTables.
This commit is contained in:
@@ -71,6 +71,25 @@ class sqlparser
|
||||
$this->isSelect = $this->statement instanceof PhpMyAdmin\SqlParser\Statements\SelectStatement === true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse tables.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function parseTables()
|
||||
{
|
||||
$from = current($this->statement->from);
|
||||
$joins = $this->statement->join;
|
||||
|
||||
$tables = array();
|
||||
$tables[] = $this->parseTable($from, 'from');
|
||||
|
||||
foreach($joins as $join) $tables[] = $this->parseTable($join->expr, 'join');
|
||||
|
||||
return $tables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse table.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user