Yes, prior to that, I have tried using *db.bins.tags_id*, but it returns
the db entry raw, which is:* |1|2|6|8|*
I would like it to return a list instead.
I have also looked up older posts on nested selects, but nothing is working
so far.
I have tried:
tags = db()._select(db.bins.tags_id)
rows = db(db.bins.id>1).select(
left=db.notes.on( db.notes.tags_id.contains(tags) )
)
Still nothing. More clues?
On Monday, October 15, 2012 10:46:27 PM UTC+8, Manuele wrote:
>
> Il 15/10/2012 16:40, lyn2py ha scritto:
> > > My code:
> > > |
> > > rows = db(db.bins.id <http://db.bins.id>>1).select(
> > > left=db.notes.on(
> > > (db.notes.tags_id.contains((*db.bins.tags_id*).split('|')) )
> > > )
> > > |
> > >
> what about:
>
> |
> rows = db(db.bins.id>1).select(
> left=db.notes.on( (db.bins.tags_id.belongs((*db.notes.tags_id*))
> )
> )
> |
>
> http://web2py.com/books/default/chapter/29/06#belongs
>
> you cannot applay a list method to a table column (even if it's
> represented as a list...)
>
> bye
>
> M.
>
--