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, 2013 11:59:34 PM UTC, Neil Johnson wrote:
>
> Hello
>
> I have a query like so
> result = db(db.tag_count.user_id == user_id).select(db.tag_count.name,
> db.tag_count.count, orderby=~ db.tag_count.count, limitby=(0, 10))
>
> where db.tag_count is defined as
>
> db.define_table('tag_count',
> Field('name'),
> Field('user_id', db.auth_user),
> Field('count', 'integer'),
> format='%(title)s')
>
>
> Which aims to return the rows with the highest tag counts
>
> In reality it returns the tag_count based on alphabetical rather numerical
> order. A sample ordering might be 21, 2,12,1 i.e. 2 > 12 where I would want
> 21,12,2,1
>
> I am using web2py 2.3.2 and SQLite
>
> Any thoughts on what I'm doing wrong?
>
> Many thanks,
>
> Neil
>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.