[TYPO3-core] RFC #11142: DBAL: Column's default value is not properly quoted in CREATE TABLE
    Martin Kutschker 
    masi-no at spam-typo3.org
       
    Mon Jun 15 22:37:02 CEST 2009
    
    
  
Xavier Perseguers schrieb:
> 
> 
> Solution:
> ------------------------------------
> It is clear that the only valid definition is the last one with an empty
> default value. My patch removes the NOQUOTE attribute when default value
> is not numeric and it results to a valid SQL:
Why don't you init like this:
$noQuote = false;
Then you have a more natural condition (no negation):
if (is_numeric($featureDef['value'][0])) { $noQuote = true; }
But what happens if I have a VARCHAR with a numeric default (eg 5)? It
will need the quotes.
So I think the quoting should be based on the field type. No quotes for
I,I1,I2,I3,I4,I8,F and N, possibly for L as well.
And I fear due to the unfortunate structure of the classes also
class.ux_t3lib_sqlparser.php has to be patched.
Masi
    
    
More information about the TYPO3-team-core
mailing list