I want to using the query
SELECT `uid` FROM `machines` ORDER BY NOT ISNULL(`changed`),`changed` DESC
in my controller . For this I use the querybuilder like this:
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('forklifts');
$statement = $queryBuilder
->select('*')
->from('machines');
I tryed to add the ORDERBY in this way:
$statement->orderBy("NOT ISNULL(`changed`)");
$statement->addOrderBy("changed", "DESC");
But this don't work. Is it possible to do this in TYPO3 Querybuilder or is there another solution to this problem?