[web2py] Re: orderby on an integer field appears to order as if field is a string

2013-02-17 Thread Neil Johnson
Thanks Massimo, I think what happened was I coded this up without the integer tag on count, then realised I needed it, and added it. The first commit occurred with the integer tag , so as far as I could see it was always an integer. Recreating the table fixed it Neil On Saturday, February 16,

[web2py] Re: orderby on an integer field appears to order as if field is a string

2013-02-16 Thread Massimo Di Pierro
Works for me: >>> db.define_table('tag_count', ... Field('name'), ... Field('count', 'integer'), ... format='%(title)s') >>> >>> import random >>> for k in range(10): ... db.tag_count.insert(name='xxx',count=random.randint(0,20)) >>> print db(