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.

Reply via email to