Then I would suggest you check your C code.
The program 'mysql' uses the C API.

Christer Holmström (at Home) wrote:

Hi, and thanks for the response, but unfortunately the same problem with
both below

SELECT exe, sum(duration) FROM data GROUP BY exe ORDER BY 2 DESC;
SELECT exe, sum(duration) AS s FROM data GROUP exe BY ORDER BY s DESC;

Works from mysql.exe but not from C API.

/Christer

-----Original Message-----
From: Joseph Bueno [mailto:joseph.bueno@;trader.com] Sent: den 4 november 2002 11:57
To: Christer Holmström (at Home)
Cc: [EMAIL PROTECTED]
Subject: Re: Problems with "ORDER BY" from C API (works from
command-line tool mysql.exe)


Christer Holmström (at Home) wrote:


Hi!

This SQL works perfect when running the command line tool mysql.exe

SELECT exe, sum(duration) FROM data GROUP BY exe ORDER BY 2

BUT when running from the C API, the "ORDER BY" part doesn't seem active, why?

Please help.

/Christer



Hi,

What do expect with "ORDER BY 2" ?
If you want to arder by "sum(duration)" you should use:
SELECT exe, sum(duration) AS s FROM data GROUP BY exe ORDER BY s

Hope this helps



---------------------------------------------------------------------
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to