Hi, 

I'm using this query :
rows = db().select(
            mytable.ALL,
            orderby=mytablename+'.'+myfield+' '+myorder,
            limitby=(page*ITEMSPERPAGE-ITEMSPERPAGE,page*ITEMSPERPAGE)
            )
'myorder' is either 'asc' or 'desc. 'mytable', 'myorderby' and 'myorder' ar 
all string, that I get through request.vars...

The DB is Postgresql.

This works well when 'myfield' is unique within the DB. But when 'myfield' 
has repeated values, running this same query, with the same parameters 
doesn't always return the same set of rows.

So the question is : When the orderby field is not enough to fully order 
tables, cause the field has repeated values, what order does Web2py apply ?
Or, maybe, it's Postgre related, and not web2py ?

thx



 

-- 



Reply via email to