Is there a way to execute plain SQL in typo3 version 10? How can I do this?
// in previous versions you could do the following
$sql = 'SELECT * FROM tt_content;';
$GLOBALS['TYPO3_DB']->sql_query($sql);
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
// ...
}
EDIT
The simple script SELECT * FROM tt_content
is only a placeholder. I want do some special migrations or some special requests for my statistic page.
$connection = GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable('tt_content');
$resultSet = $connection->query('SELECT * FROM tt_content')->execute();