Moved function to Database.php
This commit is contained in:
parent
1a3bf05dfb
commit
555c444b4e
2 changed files with 18 additions and 1 deletions
|
@ -422,7 +422,7 @@ class DBA
|
|||
*/
|
||||
public static function selectToArray($table, array $fields = [], array $condition = [], array $params = [])
|
||||
{
|
||||
return self::$database->toArray(self::$database->select($table, $fields, $condition, $params));
|
||||
return self::$database->selectToArray($table, $fields, $condition, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1407,6 +1407,23 @@ class Database
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Select rows from a table and fills an array with the data
|
||||
*
|
||||
* @param string $table Table name
|
||||
* @param array $fields Array of selected fields, empty for all
|
||||
* @param array $condition Array of fields for condition
|
||||
* @param array $params Array of several parameters
|
||||
*
|
||||
* @return array Data array
|
||||
* @throws \Exception
|
||||
* @see self::select
|
||||
*/
|
||||
public function selectToArray($table, array $fields = [], array $condition = [], array $params = [])
|
||||
{
|
||||
return $this->toArray($this->select($table, $fields, $condition, $params));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Select rows from a table
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue