如何在此查询中使用 SQL 运算符 ( https://www.w3schools.com/sql/sql_operators.asp )?比如 $uidMin = 5; $uidMax = 20; ...
$uid = 10;
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
$queryBuilder->getRestrictions()->removeAll();
$statement = $queryBuilder
->select('uid', 'pid', 'header')
->from('tt_content')
->where(
$queryBuilder->expr()->eq('uid', $uid)
)
->execute();
while ($row = $statement->fetchAll()) {
$this->view->assign('inet', $row);
}
我尝试的是例如(http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/query-builder.html)。
$uidMin = 5;
$uidMax = 20;
...
$queryBuilder->expr()->between('uid', $uidMin, $uidMax)
......但没有工作。