[TYPO3-mvc] How to handle reserved words in field definitions? (Kickstarter)

Xavier Perseguers typo3 at perseguers.ch
Thu Feb 18 10:49:09 CET 2010


Hi,

>>> 1) We can add backtics `usage` to the field definition.
>>> Not a really good solution, as the core doesn't prefix fields at many
>>> places.
 >>>
>> in general i think this should be the way to go, since it is the "most
>> clean" solution.
>> If core is not "able" to handle this, we might add it in Core. Probably
>> this makes it easier for dbal and Xavier too.
>> But he's the Database expert und should comment on that.
 >
> +1 :-)

In fact, it seems to be the best solution and could easily be done with 
some method in t3lib_db for instance, just as for quoting strings or by 
making sure the SQL parser is able to simply parse the backticks. When 
using DBAL, this would allow to "quote" those definition properly, 
according to the DBMS-specific list of reserved words or the way they 
are escaped.

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en


More information about the TYPO3-project-typo3v4mvc mailing list