I posted a response on SO : http://stackoverflow.com/questions/20697034/how-can-i-join-3-tables-and-output-a-the-all-three-together-joined-in-web2py/20698864#20698864
Le vendredi 20 décembre 2013 07:06:41 UTC+1, deepak sandhu a écrit : > > model: > > > # coding: utf8 > db.define_table('dept', > Field('name',unique=True,label='Department Name'), > format='%(name)s') > > > db.define_table('course', > Field('dept_id','reference dept'), > Field('name',unique=True,label='Course Name'), > format='%(name)s') > > > db.define_table('files', > Field('course_id', 'reference course'), > Field('documentx','upload')) > > > > > controller: > > def show_doc(): > rows = db( db.course.id == db.files.course_id , db.dept.id==db. > course.dept_id).select() > return rows > > > > > What I am trying to do is joining department with course table and course > table with files table so when out putting it shows a table with department > with course and files all together. the solution doest work. it only > creates a join between course table and files table. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.