+ [misc] add parseTables.

This commit is contained in:
qixinzhi
2024-06-11 03:08:04 +00:00
parent 802b82b609
commit 08959ef886
+19
View File
@@ -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.
*