DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Database Connection

$GLOBALS[ ‘TYPO3_DB’ ] isn’t compatible with TYPO3 9.x.

Therefore Refresh provides methods for a replacement like shown in the snippet below.

Sample with SELECTquery

// TYPO3 from 6.2 to 8.7
$query = $GLOBALS[ 'TYPO3_DB' ]->SELECTquery( $select, $from, $where, $groupBy, $orderBy, $limit );
// TYPO3 from 6.2 to 9.x
$query = Netzmacher\Refresh\Compatibility\Core\Database\DatabaseConnection::SELECTquery( $select, $from, $where, $groupBy, $orderBy, $limit );

Conditions

WHERE

The Refresh database-connection-methods can handle simple where statements only!

  • A where statement must not contain the enablefields statement.
  • A where statement must not be nested.
// OK: simple where statement
tx_org_cal.pid IN (1841,1842,1843,1844,1840) AND tx_org_cal.uid IN (13,16,14,15)
// Will occure an error: nested where statement
((tx_org_cal.endtime = 0) OR (tx_org_cal.endtime > 1509292560)) AND (((tx_org_cal.fe_group = '') OR (tx_org_cal.fe_group IS NULL) OR (tx_org_cal.fe_group = '0') OR (FIND_IN_SET('0', tx_org_cal.fe_group)) OR (FIND_IN_SET('-1', tx_org_cal.fe_group))))