Elcimar
unread,Sep 13, 2011, 12:59:41 PM9/13/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
Hi folks, newbie question here.
I have a table 'mensagens' with a field:
SQLField("usuario", "integer", length=255, notnull=True, default=None,
represent = lambda id: db.acessos[id].nick)
Then, after adding some data to this table I try to view some records:
registros = SQLTABLE(db().select(db.mensagens.ALL))
It works fine. But I don't need an SQLTABLE right now, I just need the
data, but if I do this:
registros = db().select(db.mensagens.ALL)
The 'represented' field shows its actual id instead of a 'nick'.
What should I do?