SQLField is just an alias for Field. The 2ed edition of the manual
(2009) should only use Field.



On 2 Lug, 09:00, elfuego1 <elfue...@gmail.com> wrote:
> Is it really?
> I want to make sure because that's the syntax in the manual for
> creating fields in MySql database.
>
> On 2 Lip, 14:08, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > P.S. Please use Field, SQLFIeld is deprecated.
>
> > On 2 Lug, 06:47, Rick <sababa.sab...@gmail.com> wrote:
>
> > > Hi,
>
> > > I want to generate a table like this:
>
> > >         db.define_table(objects[i],
> > >                 SQLField(locus),
> > >                 SQLField(before)
> > >                 SQLField(after)
> > >                 SQLField(name)
> > >                 SQLField(main_name)
>
> > > ...with a code similar to this :
>
> > >                 objects = ['substance', 'process', 'condition']
> > >                 linksubobjects = ['locus', 'before', 'after']
> > >                 unlinksubobjects = ['name', 'main_name']
> > >                 for i in range(len(objects)):
>
> > >                         db.define_table(objects[i],
> > >                                 for k in range(len(linksubobjects[k])):
> > >                                         SQLField([linksubobjects[k]]),
> > >                                 for l in range(len(unlinksubobjects)):
> > >                                         SQLField([unlinksubobjects[l]]),
> > >                                 )
>
> > > ...but I get errors on the "k" and "l" loops. Does anyone have an idea
> > > how to make these loops work?
>
> > > Thanks in advance for help!

Reply via email to