[TYPO3-dev] SQL parser odities
R. van Twisk
typo3 at rvt.dds.nl
Mon Nov 27 15:28:06 CET 2006
Steffen Kamper wrote:
> "R. van Twisk" <typo3 at rvt.dds.nl> schrieb im Newsbeitrag
> news:mailman.52127.1164596406.30218.typo3-dev at lists.netfielders.de...
>
>> Steffen Kamper wrote:
>>
>>> "R. van Twisk" <typo3 at rvt.dds.nl> schrieb im Newsbeitrag
>>> news:mailman.50935.1164565530.30218.typo3-dev at lists.netfielders.de...
>>>
>>>
>>>> Hey All,
>>>>
>>>> I defined this table
>>>>
>>>> CREATE TABLE tx_extensioname_index (
>>>> otype varchar(24) DEFAULT '' NOT NULL,
>>>> fname varchar(24) DEFAULT '' NOT NULL,
>>>> fvalue varchar(64) DEFAULT '' NOT NULL,
>>>> record_uid int(11) DEFAULT '0' NOT NULL,
>>>> KEY lookup(otype, fname)
>>>> )
>>>>
>>>>
>>>> But for some reason the SQL parser creates something weird,
>>>> of it during extension installation:
>>>>
>>>>
>>>> CREATE TABLE tx_extensioname_index (
>>>> otype varchar(24) NOT NULL default '',
>>>> fname varchar(24) NOT NULL default '',
>>>> fvalue varchar(64) NOT NULL default '',
>>>> record_uid int(11) DEFAULT '0' NOT NULL,
>>>> ) ,
>>>> KEY lookup(otype, fname)
>>>> );
>>>>
>>>> Why would the SQL parser add an extra ) , before the KEY?
>>>>
>>>> Ries
>>>>
>>>>
>>>>
>>>>
>>> Hi Ries,
>>>
>>> where do you defined that?
>>> in ext_tables.sql ?
>>>
>>> vg Steffen
>>>
>>>
>> Yes Sir!!!
>>
>> Ries
>>
>>
> Hi Ries,
>
> I can confirm that.
> It's because of missing ; at the end, so if you write
>
> CREATE TABLE tx_extensioname_index (
> otype varchar(24) DEFAULT '' NOT NULL,
> fname varchar(24) DEFAULT '' NOT NULL,
> fvalue varchar(64) DEFAULT '' NOT NULL,
> record_uid int(11) DEFAULT '0' NOT NULL,
> KEY lookup(otype, fname)
> );
>
> all will be done correct.
>
>
Shit!!!
You are right....
I was puzzled by the weird SQL created by the SQL parser,
and I was more wondering if my SQL wasn't right at all..
Ries
--
Ries van Twisk
Freelance Typo3 Developer
=== Private:
email: ries at vantwisk.nl
web: http://www.rvantwisk.nl/freelance-typo3.html
skype: callto://r.vantwisk
More information about the TYPO3-dev
mailing list