scenario: I have 3 tables in a db(table1, table2,table3) - in table1 = has table1Col.id - in table2 = has table2Col.id and table1Col (from table1.table1Col.id) and other entities - in table3 = has table3Col.id and table2Col (from table2.table2Col.id) and other entities
means. table2 has link with table1 through table1Col.id and table3 has link with table2 though table2Col.id Task: I would like to join these 3 tables together through the Col.id and import them into a new created table called table4 Own solution (not complete, still have some error but I cannot solve): if form.accepts(request.vars,session): join_list=db(db.table1Col.id).select(db.table2.table1Col_id) for id in db.table2: table2id_list.append(id) filelist.append(table2.file) records=db(db.table3.table2Col_id==id).select (db.table3.table2Col_id) table3ColId_list=db.table2.id for id in table3ColId_list: filelist.append(table3.file) print filelist #would like to print out the list 1st before it import into table4 Anyone can help me?? or any guidance how to continue the code above and import into table4?? thank alot in advance --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---