> please help.
> how do i this SQL
> SELECT *
> FROM `TAthlet`
> WHERE TCountry_id = 'AUT'
>
> The table "TAthlet" have this fields:
> TUnion_id
> id
> short
> name
> TGender_id
> TGoup_id
> TCountry_id
>
> This does not work:
> from sqlobject import *
> sqlhub.processConnection =
> connectionForURI('mysql://archer:xxx...@localhost/adb')
>
> class TAthlet(SQLObject):
> class sqlmeta:
> #if i dont do this i get a wrong tathlet table
> table = "TAthlet"
> fromDatabase = True
>
> TAthlet._connection.debug = True
> r = TAthlet.select(TAthlet.q.Tcountry_id=='AUT')
>
> The Error:
> AttributeError: TAthlet instance has no attribute 'Tcountry_id'
>
what about:
r = TAthlet.select(TAthlet.q.TcountryId=='AUT')
Petr
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss