Problem solved,

p = == "pets")
works instead of:
p = MyTable.selectBy(name == "pets")

Sorry for bothering your weekend time :-)


On Jan 19, 2008 6:17 PM, Petr JakeŇ° <> wrote:
Hi, I have following problem:

following code throw this error:
unhandled NameError, global name 'name' is not defined
and I really do not know what to do to write it properly

class MyTable(SQLObject):
    name=StringCol(length=20, default=None)
rPets = MyTable(name="pets")
rBirds = MyTable( name="birds")

class AnOtherClass():
    def selbyMethod(self):
        p = MyTable.selectBy(name == "pets")
        for mRow in p:
            print mRow


Thanks for your advices

Petr Jakes