Hi, I have this db model:
db.define_table('patients', Field('name', 'string', length=32), Field('firstname', 'string', length=32), Field('dob', 'date'), format='%(name)s') db.define_table('dataset1', Field('date', 'date', length=32), Field('param1', 'string', length=50), Field('param2', 'string', length=50), Field('patient_id', db.patients, writable=False, readable=False)) db.define_table('dataset2', Field('date', 'date', notnull=True), Field('test1', 'text'), Field('patient_id', db.patients, writable=False, readable=True)) I'd like to show in one view, for 1 patient_id, all the corresponding dataset1 and dataset2 ordered by date. What query should I use? Do I have to use an intermediate table 'history' to record each activity in dataset1/2 to get a result? Thanks for help. --