>
> db.define_table('channel',
> Field('channel_name'))
>
> db.define_table('schedule',
>
> Field('userinfo',db.auth_user,default=auth.user_id,readable=False,writable=False),
> Field('show',db.show,requires=IS_IN_DB(db,db.show.id,'%(title)s')),
> Field('channel',requires=IS_IN_DB(db,db.channel.channel_name)),
> Field('hour',requires=IS_IN_DB(db,db.time.hour,'%(hour)s')),
> Field('min', label='Minute', default='00'),
> Field('daytime',requires=IS_IN_DB(db,db.daytime.time)),
> Field('date','date',requires=IS_NOT_EMPTY()))
>
"channel", "hour", and "daytime" are *not* linked fields. Each has an
IS_IN_DB validator, but that just ensures that the value inserted is one of
the existing values in the associated field in the other table. If you want
to link the fields, you should make them reference fields, in which case
they will store the record IDs of the associated records in the linked
tables.
Anthony