* [misc] add call_user_func_array.

This commit is contained in:
qixinzhi
2024-09-06 09:06:59 +08:00
committed by 曹延义
parent bdecc84411
commit 67a6bc0a6f
+7 -2
View File
@@ -236,7 +236,7 @@ class sqlparser
/**
* Get expression.
*
* @param string $table
* @param string|array $table
* @param string $column
* @param string $alias
* @param string $function
@@ -245,6 +245,8 @@ class sqlparser
*/
public function getExpression($table = null, $column = null, $alias = null, $function = null)
{
if(is_array($table)) return call_user_func_array(array($this, 'getExpression'), $table);
$expression = new PhpMyAdmin\SqlParser\Components\Expression();
if(!empty($function))
@@ -355,6 +357,8 @@ class sqlparser
*/
public function getCondition($tableA = null, $columnA = null, $operator = '', $tableB = null, $columnB = null, $group = 1)
{
if(is_array($tableA)) return call_user_func_array(array($this, 'getCondition'), $tableA);
$condition = new PhpMyAdmin\SqlParser\Components\Condition();
$tableA = $this->trimExpr($tableA);
@@ -369,7 +373,8 @@ class sqlparser
$operator = strtoupper($operator);
$condition->expr = "$exprA $operator $exprB";
$condition->expr = "$exprA $operator $exprB";
$condition->group = $group;
return $condition;
}