I know that you can do : result = db((db.xxx.tag==tag) & (db.xxx.status==status)).select()
But i don't know how to generate the condition, one by one... On 10 fév, 23:10, gbs <grosbe...@gmail.com> wrote: > Hi, > > i have search posts on this group, but i don't have found the solution > of my question :$ > > I have a table, wich display record of a database, nothing weird.. > > I have made a form, so you can "filter" the result. > > You can check "Tag" of the record, "Status" of the record, so on... > > How can i create an sql "requete/statement" : ?? > > sql = "" > -- if tag : > sql += "tag = xxx" > -- if status: > sql += " and status = xxx" > > result = db(sql).select() > > it's just an example, wich don't work, but i don't understand how to > chain condition of a query :$ > > Best regards