I think there's no way in a single query...

try making two different query and join results creating a brand new rows object

I hope it could help

    Manuele


Il 28/08/2017 18:04, Artem ha scritto:
Hello !
Hope someone can help . Thanks in advance !
I have two database :
db1 = DAL('sqlite://first.sqlite')
db2 = DAL('sqlite://second.sqlite')
with tables :
db1.define_table('table1',
Field('id',requires=IS_NOT_EMPTY()),
Field('pid',type='integer'),
Field('title',type='string'),
)
and
db2.define_table('table2',
Field('id',requires=IS_NOT_EMPTY()),
Field('pid',type='integer'),
Field('data',type='string'),
)
How to execute sqlite join ,something like:
sql ="SELECTdb1.id, db1.title,db2.data FROMdb1.table1 INNER JOIN db2.table2ONdb2.table2.pid== db1.table1.pid"
db1.executesql(sql) doesn't work

--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to