I´ll try to explain, I need check if any record of a given field is
contained in a string. Is there any solution?

On 7 Mai, 17:03, mdipierro <mdipie...@cs.depaul.edu> wrote:
> This should work
>
> db("'%' || NEW.field_1 || '%'  LIKE
> table_1.field_1").select(db.table_1.field_1)
>
> On May 7, 9:35 am, AsmanCom <d.as...@web.de> wrote:
>
> > Hi,
>
> > here is the important Code from an Sqlite trigger i use very often, is
> > this possible with web2py to?
>
> > Sqlite:
> > (SELECT table_1.field_1 FROM table_1 WHERE '%' || NEW.field_1 || '%'
> > LIKE table_1.field_1 )
>
> > or i can even do:
>
> > (SELECT table_1.field_1 FROM table_1 WHERE '%' || NEW.field_1 || '%'
> > LIKE  '%' || table_1.field_1  || '%'  )
>
> > w2p:
> > db.person.name.lower().like(‘m%’)

Reply via email to