On Tuesday, August 29, 2017 at 1:19:29 AM UTC-7, Artem wrote:
>
> Hi ,
> Yes, tried
> it rise error : OperationalError: no such table: table1 
>

I think the problem is the db() out front.  You're asking for an operation 
(method) on a database object that doesn't have your tables.  You have a 
db, as well as  db1 and db2?

I'm not doing any better than Manuele is coming up with a way of doing 
this.  You need a list of ids from both tables, and those have to come from 
separate databases.  You could try changing the db() to either db1() or 
db2(), but I'm not confidant that it would work, and I imagine you'd only 
get the entries from the one table, just filtered by the other.  

Niphlod and Massimo and Giovanni are probably the experts you need.

/dps


>
> On Tuesday, August 29, 2017 at 5:58:20 AM UTC+8, 黄祥 wrote:
>>
>> had you tried ?
>> *e.g. not tested*
>> rows = db(db1.table1.pid == db2.table2.pid).select()
>>
>> ref:
>>
>> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Inner-joins
>>
>> best regards,
>> stifan
>>
>

-- 
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/d/optout.

Reply via email to