mirror of https://github.com/friendica/friendica
Fix static calls
This commit is contained in:
parent
799417ed1a
commit
79f746d014
|
@ -408,6 +408,29 @@ class DBA
|
||||||
return self::$dba->count($table, $condition);
|
return self::$dba->count($table, $condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the SQL condition string built from the provided condition array
|
||||||
|
*
|
||||||
|
* This function operates with two modes.
|
||||||
|
* - Supplied with a filed/value associative array, it builds simple strict
|
||||||
|
* equality conditions linked by AND.
|
||||||
|
* - Supplied with a flat list, the first element is the condition string and
|
||||||
|
* the following arguments are the values to be interpolated
|
||||||
|
*
|
||||||
|
* $condition = ["uid" => 1, "network" => 'dspr'];
|
||||||
|
* or:
|
||||||
|
* $condition = ["`uid` = ? AND `network` IN (?, ?)", 1, 'dfrn', 'dspr'];
|
||||||
|
*
|
||||||
|
* In either case, the provided array is left with the parameters only
|
||||||
|
*
|
||||||
|
* @param array $condition
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function buildCondition(array &$condition = [])
|
||||||
|
{
|
||||||
|
return Database::buildCondition($condition);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Fills an array with data from a query
|
* @brief Fills an array with data from a query
|
||||||
*
|
*
|
||||||
|
@ -420,6 +443,17 @@ class DBA
|
||||||
return self::$dba->toArray($stmt, $do_close);
|
return self::$dba->toArray($stmt, $do_close);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the SQL parameter string built from the provided parameter array
|
||||||
|
*
|
||||||
|
* @param array $params
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function buildParameter(array $params = [])
|
||||||
|
{
|
||||||
|
return Database::buildParameter($params);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the error number of the last query
|
* @brief Returns the error number of the last query
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue