It's my mistake. Of course,  autos.out='T' and autos.svh='F'.
Thanks!

On 25 апр, 16:21, Massimo Di Pierro <[email protected]>
wrote:
> ... autos.out='T' and autos.out='F' ... ?
>
> On Apr 25, 12:34 am, cyber <[email protected]> wrote:
>
>
>
>
>
>
>
> > I used to use construction like this:
> > rows_count=db(db.autos.out=='T').count(), but my real query consists
> > of many conditions. So I decided to use executesql.
>
> > By the way, I wrote the code:
> >    rows_count = db.executesql("SELECT count(1) FROM autos WHERE
> > autos.out='T' and autos.out='F' and autos.idk='F' and autos.svh='F'
> > and autos.rad='F' and autos.out='F' and autos.tranzit='F'",
> > as_dict=False)
> >    rows_count=rows_count[0][0]
> > I think this construction is more preferable for me.
>
> > And thank you very much for the help. Your advice was very helpfull
> > for me.
> > **********************************************************
>
> > On 23 апр, 21:35, Vasile Ermicioi <[email protected]> wrote:
>
> > > but it is nicer if you have models (you can generate them from database
> > > tables)
>
> > > print db(db.autos.out=='T').count()

Reply via email to