Dear Oleg,

        after many trials it seems to me that order by clause works only for 
one field.
if the orderBy parameter receives list or tuple, because i need more order 
clause then the system parse this as sequence and the result within brackets - 
and it is true this sql cannot execute in mysql (received the same error in 
client)

if the orderBy parameter is string like "column1, column2"; 
-------------
documentation: You can use the keyword arguments orderBy to create ORDER BY in 
the select statements: orderBy
takes a string, which should be the database name of the column, or a column in 
the form Person.q.
firstName. You can use "-colname" to specify descending order, or call 
MyClass.select().
reversed().
-------------
seems that the result is not ordered!!

the only thing which works is orderBy = VssHistory.q.datetime
this works too orderBy = -VssHistory.q.datetime ---> descending order

but how can i make a query with more order by fields?


*********** REPLY SEPARATOR  ***********

On 08/09/2006 at 18:40 Oleg Broytmann wrote:

>On Fri, Sep 08, 2006 at 03:58:42PM +0200, Ivan Horvath wrote:
>> SELECT history.username, objects.type, objects.obj_file,
>history.datetime, history.comment FROM objects, history WHERE
>(((history.username) = ('Ivan')) AND ((objects.id) =
>(history.objects_id))) ORDER BY (history.datetime, objects.type)
>> 
>> OperationalError: (1241, 'Operand should contain 1 column(s)') error
>
>   Try to run the query directly on the server, from the command line. Try
>to simplify the query - remove ORDER BY, do ORDER BY one parameter or the
>other...
>
>Oleg.
>-- 
>     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
>           Programmers don't die, they just GOSUB without RETURN.
>
>-------------------------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job
>easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>sqlobject-discuss mailing list
>sqlobject-discuss@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss


Best regards, 
    Ivan Horvath 
    Chief Programmer 
 
 Alcatel ISD 
 PMS 2000 Product Team 
 
 H-1116, Budapest 
 Kondorfa u. 10. 
 Tel.: +36 1 209 9546 
 Fax.: +36 1 209 9599 
 Mobil: +36 30 257 0235 
 VOIP: +49 511 676 478010 
 [EMAIL PROTECTED] 

Anyone who has never made a mistake has never tried anything new. 

/Albert Einstein/ 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to