Re: [SQLObject] orderBy table.q.attribute
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Philippe N. <sw...@fr...> - 2004-04-23 15:33:19
|
On Fri, Apr 23, 2004 at 07:16:29PM +0400, Oleg Broytmann wrote: > On Fri, Apr 23, 2004 at 04:50:23PM +0200, Philippe Normand wrote: > > On Fri, Apr 23, 2004 at 06:48:43PM +0400, Oleg Broytmann wrote: > > > Hello. > > >=20 > > > How can I orderBy using table.q.attribute magic? > > >=20 > > > patients =3D Patient.select(None, orderBy=3D-Patient.q.registrationTi= me) > > >=20 > >=20 > > Well, what's the dash out there ? >=20 > No difference without it: I don't understand the 'None' ... Do you want to select ... nothing ? hmm :) Try replacing None with 'all'. And, still the dash doesn't make sense to me because orderBy has to be a string, not a number. Anyway ... >=20 > What if I want to orderBy a complex condition? >=20 > ...orderBy=3D[-registrationTime, name, surname] Never tried such a thing. --=20 Philippe Normand |