Please look at:
http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html  and probably it
causes an error
please try with different field's name.

T.


2012/8/1 Aurelijus <aurelijus.usec...@gmail.com>

> I really have no clue.. Could it be?
>
> On Wed, Aug 1, 2012 at 3:36 PM, tomasz bandura 
> <tomasz.band...@gmail.com>wrote:
>
>> Is it 'long' a mysql's reserved word?
>>
>> Regards
>> Tomasz
>>
>> 2012/8/1 Aurelijus Useckas <aurelijus.usec...@gmail.com>
>>
>>> this is the trigger i guess:
>>>
>>> db.define_table('maps',
>>>     Field('name'),
>>>     Field('last_name'),
>>>     Field('long'),
>>>     Field('lat'),
>>>     format='%(name)s')
>>>
>>> On Wednesday, August 1, 2012 3:30:40 PM UTC+3, Aurelijus Useckas wrote:
>>>>
>>>> Hi,
>>>>
>>>> I've built the app on SQLite and now want to migrate to the server
>>>> based mysql. BUT web2py hangs in the middle of creating, basicaly just
>>>> after the auth tables. When I restart the apache I can see auth tables as
>>>> well as a few from my app.
>>>>
>>>> this is the err ticket that I get:
>>>>
>>>> (dp1
>>>> S'output'
>>>> p2
>>>> S'<class \'gluon.contrib.pymysql.err.**ProgrammingError\'> (1064,
>>>> u"You have an error in your SQL syntax; check the manual that corresponds
>>>> to your MySQL server version for the right syntax to use near \'long
>>>> VARCHAR(255),\\n    lat VARCHAR(255),\\n    PRIMARY KEY(id)\\n)
>>>> ENGINE=InnoDB CHA\' at line 5")'
>>>> p3
>>>> sS'layer'
>>>> p4
>>>> S'/opt/web-apps/web2py/**applications/init/models/db_**comp.py'
>>>> p5
>>>> sS'code'
>>>> p6
>>>>
>>>>  thnx
>>>>
>>>  --
>>>
>>>
>>>
>>>
>>
>>  --
>>
>>
>>
>>
>
>  --
>
>
>
>

-- 



Reply via email to