[TYPO3-dev] TYPO3 and MySQL Strict Mode
Martin Kutschker
masi-no at spam-typo3.org
Mon Jul 13 08:26:05 CEST 2009
Ries van Twisk schrieb:
>
> 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.
That's right. DBAL should run fine on strict mode. At least it's
probably easier to get it running in that mode.
Masi
More information about the TYPO3-dev
mailing list