List:General Discussion« Previous MessageNext Message »
From:Joseph Bueno Date:November 4 2002 10:56am
Subject:Re: Problems with "ORDER BY" from C API (works from command-line
tool mysql.exe)
View as plain text  
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
-- 
Joseph Bueno

Thread
Problems with "ORDER BY" from C API (works from command-line tool mysql.exe)at Home \ )4 Nov
  • Re: Problems with "ORDER BY" from C API (works from command-linetool mysql.exe)Joseph Bueno4 Nov
    • RE: Problems with "ORDER BY" from C API (works from command-line tool mysql.exe)at Home \ )4 Nov
      • Re: Problems with "ORDER BY" from C API (works from command-linetool mysql.exe)gerald_clark4 Nov
        • RE: Problems with "ORDER BY" from C API (works from command-line tool mysql.exe)at Home \ )4 Nov
          • RE: Problems with "ORDER BY" from C API (works from command-line tool mysql.exe)at Home \ )4 Nov
    • Re: Problems with "ORDER BY" from C API (works from command-line tool mysql.exe)Benjamin Pflugmann5 Nov
    • Re: Problems with "ORDER BY" from C API (works from command-line tool mysql.exe)Paul DuBois5 Nov
      • RE: Problems with "ORDER BY" from C API (works from command-line tool mysql.exe)at Home \ )5 Nov