Ok and how do you fill up this table? By the way SQLField is deprecated... Use Field() instead.
Richard On Tue, Jan 4, 2011 at 2:43 PM, pk <peter.kirch...@youngdesigners.de> wrote: > ######################################################################### > ## Tabelle Onlineuser > ######################################################################### > db.define_table('online', > SQLField('user_id',db.auth_user), > SQLField('last_visit','integer')) > > On 4 Jan., 16:40, Richard Vézina <ml.richard.vez...@gmail.com> wrote: > > The model are missing for db.online > > > > Richard > > > > > > > > > > > > > > > > On Mon, Jan 3, 2011 at 5:13 PM, pk <peter.kirch...@youngdesigners.de> > wrote: > > > hi together, > > > > > i have a function for the onlineuser: > > > > > usersall=db(db.online.last_visit>time.time()-dt) > > > (db.online.user_id==db.auth_user.id).select(db.auth_user.ALL) > > > return TABLE(*[TD(user.user_name) for user in usersall]) > > > > > but i will to get all the onlineuser which are friends of mine. > > > here is my friendsdatabasetable: > > > > > > ######################################################################### > > > ## Tabelle Freunde > > > > ######################################################################### > > > db.define_table('friends', > > > SQLField('userid', > > > default=auth.user.id if auth.user else 0, > > > writable=False, readable=False), > > > SQLField('hauptperson', > > > default=auth.user.user_name if auth.user else > > > 0, > > > writable=False, readable=False, > > > label='Hauptperson'), > > > SQLField('freund', label='Freund'), > > > SQLField('freundseit', 'datetime', > > > default=request.now, label='Freund seit'), > > > SQLField('bestaetigt','boolean', default=False)) > > > > > db.friends.userid.requires=IS_IN_DB(db,'auth_user.id') > > > db.friends.hauptperson.requires=IS_IN_DB(db,'auth_user.user_name') > > > db.friends.freund.requires=IS_IN_DB(db,'auth_user.user_name') > > > > > how can i get this list and how can i do the name clickable??? > > > > > thanks for your help > > > > > peter >