I believe you want

results=db(db.autos.num.contains(n)).select()


On Apr 5, 3:58 pm, cyber <[email protected]> wrote:
> I need a hint!
>
> It seems that LIKE operator doesn't work.Or... I'm not so clever
> human...
>
> Say, how can I deal with rawsql query? I need to find all records but
> I know only some part of exact value. The code:
>
> n=request.vars.num  ### it returns only number
> results=db.executesql("SELECT * FROM autos WHERE num LIKE %s;" %(n))
> ### select
> return dict(results=results) ### it returns rows with exact n values
> only
>
> ... how can I find all records (not only n) including missed nums and
> chars?

Reply via email to