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.


Reply via email to