[TYPO3-dev] TYPO3 and MySQL Strict Mode

Ries van Twisk typo3 at rvt.dds.nl
Mon Jul 13 02:27:40 CEST 2009


On Jul 12, 2009, at 2:06 PM, Martin Kutschker wrote:

> Ries van Twisk schrieb:
>>>
>>> Integer fields can be quoted. This is not a error but a fully valid
>>> SQL behavior. In your case this was not a cause of error. The image
>>> says that 'temp_content' was invalid.
>>
>>
>> in some databases and MySQL in strict mode an integer quoted as a  
>> empty
>> string will not result in a 0 being added, but generates an error.
>
> And right they are! Sadly TYPO3 relies on this sloppy way of PHP/Mysql
> in many places.
>
>> Besides, good practice will be to not quote numbers in general....  
>> (but
>> this is out of scope of this mail).
>
> Absolutely no SQL generating code in TYPO3 cares about the column  
> types :(
>
> Masi


I believe using MySQL in strict mode with DBAL can do the trick, I  
never tried it
but because same problems need to be solved for other DB's it might be  
a possibility.

for these who really want to run TYPO3 with MySQL in strict....

Ries








More information about the TYPO3-dev mailing list