Okay- figured it out.

In the chance anyone else has this problem (which is more of a
misfiring)

u = UserCode.select( UserCode.q.usercode=='007')[0]

Or, better yet:

u = UserCode.select( UserCode.q.usercode=='007')
for uc in u:
      # and then deal with it

So long as usercode is unique-- which it will be.





On Nov 10, 2:46 pm, jasper_coder <[EMAIL PROTECTED]> wrote:
> Preparing to toss the old machine through the window... and everything
> was going so well ;o) and, in fact with the other Classes I've
> declared in the model, it is working smoothly.
>
> Have this as part of the controller, and am attempting to just
> instantiate a UserCode object based on that usercode ('007')
>
> u = UserCode.select( UserCode.q.usercode=='007' )
> n = u.name
>
> My model seems straightforward enough:
>
> class UserCode(SQLObject):
>     usercode = StringCol(length=3)
>     name = StringCol(length=30)
>     lastname = StringCol(length=30)
>     phone = StringCol(length=20)
>     email = StringCol(length=20)
>     date = DateCol()
>     usertrack = MultipleJoin('UserTrack')
>
> Anyway, so I keep getting an error that says:
>
> 'SelectResults' object has no attribute 'name'
>
> Oh, and I have manually entered the specific UserCode with '007' (so
> it should exist).
>
> Thanks in advance(!)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to