Skip to content
Snippets Groups Projects
Verified Commit 80e67120 authored by Damien's avatar Damien
Browse files

FEAT #11296 TIME 0:10 Left join folders

parent 85aeff51
No related branches found
No related tags found
No related merge requests found
......@@ -124,15 +124,11 @@ class FolderModelAbstract
{
ValidatorModel::arrayType($args, ['select', 'where', 'data']);
$where = ['folders.id = entities_folders.folder_id', 'folders.id = resources_folders.folder_id'];
if (!empty($args['where'])) {
$where = array_merge($where, $args['where']);
}
$folders = DatabaseModel::select([
'select' => empty($args['select']) ? ['*'] : $args['select'],
'table' => ['folders, entities_folders, resources_folders'],
'where' => $where,
'table' => ['folders', 'entities_folders', 'resources_folders'],
'left_join' => ['folders.id = entities_folders.folder_id', 'folders.id = resources_folders.folder_id'],
'where' => empty($args['where']) ? [] : $args['where'],
'data' => empty($args['data']) ? [] : $args['data']
]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment