hi,
i know that i can check one field with IS_NOT_IN_DB()
but i need the two fields which deposit not together in one row,
in my case 'hauptperson' and 'freund'.
here is my table:
#########################################################################
## 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', unique=True),
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')
can somebody help me???
thanks