Actions
Bug #21797
closedSQL error in translationCount() if table does not provide deleted field
Start date:
2009-12-04
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Like you can see at "Additional Information", you will get a MySQL-Error message when there is no deleted-field in a table.
This is the error-message I get:
t3lib_DB::exec_SELECTquery
ERROR
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=0' at line 1
lastBuiltQuery
SELECT COUNT FROM tx_myquizpoll_result WHERE l10n_parent=100 AND sys_language_uid!=0 AND =0
I didnĀ“t get this error message in typo3 version 4.2.10 !
Please check if $GLOBALS['TCA'][$table]['ctrl']['delete'] is set !
public static function translationCount($table, $ref, $msg = '') {
if (empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable']) &&
$GLOBALS['TCA'][$table]['ctrl']['languageField'] &&
$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] &&
!$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable']) {
$count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows(
'*',
$table,
$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] . '=' . intval($ref) .
' AND ' . $GLOBALS['TCA'][$table]['ctrl']['languageField'] . '!=0'
' AND ' . $GLOBALS['TCA'][$table]['ctrl']['delete'] . '=0'
);
}
return ($count ? ($msg ? sprintf($msg, $count) : $count) : '');
}
(issue imported from #M12928)
Files
Updated by Kurt Gusbeth almost 15 years ago
The error occurs in the "Web" -> "List" view mode.
Updated by Christian Kuhn almost 15 years ago
- Committed to trunk rev. 6740
- Committed to TYPO3_4-3 rev. 6741
Actions