+ [misc] add statement.

This commit is contained in:
qixinzhi
2024-06-11 02:56:47 +00:00
parent c9e1b2c8bd
commit 87300613df
+11 -2
View File
@@ -19,6 +19,14 @@ class sqlparser
*/
public $statements;
/**
* First statement.
*
* @var object
* @access public
*/
public $statement;
/**
* Count statements.
*
@@ -31,8 +39,9 @@ class sqlparser
{
$query = $this->skipLineBreak($query);
$this->parser = new PhpMyAdmin\SqlParser\Parser($query);
$this->statements = $this->parser->statements;
$this->parser = new PhpMyAdmin\SqlParser\Parser($query);
$this->statements = $this->parser->statements;
$this->statement = $this->statementsCount > 0 ? current($this->statements) : null;
$this->statementsCount = count($this->statements);
}