Yes, very right about that.

On May 27, 11:19 pm, mdipierro <[email protected]> wrote:
> Technically this is correct because
>
> Adam
> M
> McGinnis
>
> Technically "M" is before "McGinnis".
>
> You should use (lastname<"N") to include "McGinnis"
>
> Notice that the selection is done by the database (sqlite) not web2py.
>
> Massimo
>
> On May 27, 10:50 pm, JohnMc <[email protected]> wrote:
>
> > I have the following:
>
> > Model:
>
> > dbhlx=SQLDB("sqlite://contacts.db")
> > dbhlx.define_table('contact',
> >                 dbhlx.Field('firstname'),
> >                 dbhlx.Field('lastname'))
>
> > Using the Web2Py command line --
>
> > The complete data set --
>
> > In [64]: rows = dbhlx((dbhlx.contact.id>0)).select
> > (dbhlx.contact.lastname)
>
> > In [65]: print rows
> > contact.lastname
> > McGinnis
> > McGinnis
> > tester
> > Sue
> > Adams
> > Zammie
>
> > The dataset filtered --
>
> > In [66]: rows = dbhlx((dbhlx.contact.lastname >='M')).select
> > (dbhlx.contact.lastname)
>
> > In [67]: print rows
> > contact.lastname
> > McGinnis
> > McGinnis
> > tester
> > Sue
> > Zammie
>
> > Whereas --
>
> > In [68]: rows = dbhlx((dbhlx.contact.lastname <='M')).select
> > (dbhlx.contact.lastname)
>
> > In [69]: print rows
> > contact.lastname
> > Adams
>
> > I would have expected
>
> > In [69]: print rows
> > contact.lastname
> > McGinnis
> > McGinnis
> > Adams
>
> > Is this an unexplained boundary condition?
>
> > Thx
>
> > JohnMc
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to