You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.1 KiB
49 lines
1.1 KiB
4 weeks ago
|
<?php
|
||
|
|
||
|
use App\Enumerators\SessionElement;
|
||
|
use App\Wrappers\DatabaseInteractions;
|
||
|
use App\Wrappers\SessionWrapper;
|
||
|
use App\Wrappers\SQLQueryBuilderWrapper;
|
||
|
use App\Wrappers\TwigWrapper;
|
||
|
|
||
|
require_once __DIR__ . "/../../vendor/autoload.php";
|
||
|
|
||
|
$db = new DatabaseInteractions();
|
||
|
|
||
|
|
||
|
$tuneSetDetails = $db->RunOneSelect(
|
||
|
queryBuilder: SQLQueryBuilderWrapper::SELECT_ONE(
|
||
|
table: 'TuneSets',
|
||
|
id: $_GET["tune-set-id"]
|
||
|
)
|
||
|
);
|
||
|
|
||
|
$tunesInSet = $db->RunSelect(
|
||
|
queryBuilder: SQLQueryBuilderWrapper::SELECT(
|
||
|
table: 'TuneSetTunes'
|
||
|
)
|
||
|
->cols(cols: [
|
||
|
'T_T.ID AS TuneID',
|
||
|
'T_T.CreatedAt AS TuneCreatedAT',
|
||
|
'T_T.CreatedBy AS TuneCreatedBy',
|
||
|
'T_T.Title AS TuneTitle',
|
||
|
'T_T.Copyright AS TuneCopyright',
|
||
|
])
|
||
|
->join(
|
||
|
join: 'INNER',
|
||
|
spec: 'Tunes AS T_T',
|
||
|
cond: 'T.TuneID=T_T.ID',
|
||
|
)
|
||
|
->orderBy(spec: [
|
||
|
'T.Order ASC',
|
||
|
])
|
||
|
);
|
||
|
|
||
|
TwigWrapper::RenderTwig(
|
||
|
target: "Pages/tune-set/uuid.html.twig",
|
||
|
arguments: [
|
||
|
"TuneSetDetails"=>$tuneSetDetails,
|
||
|
"TunesInSet"=>$tunesInSet,
|
||
|
]
|
||
|
);
|