| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Benjamin Pflugmann | Date: | November 4 2002 9:13pm |
| Subject: | Re: Problems with "ORDER BY" from C API (works from command-line tool mysql.exe) | ||
| View as plain text | |||
Hi. On Mon 2002-11-04 at 11:56:40 +0100, joseph.bueno@stripped wrote: > Christer Holmström (at Home) wrote: [...] > > 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? [...] > What do expect with "ORDER BY 2" ? That is a shortcut for what you explain below. > 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 See http://www.mysql.com/doc/en/SELECT.html (look for "column position") Regards, Benjamin. -- benjamin-mysql@stripped
| 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 Bueno | 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-linetool mysql.exe) | gerald_clark | 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) | at Home \ ) | 4 Nov |
| • Re: Problems with "ORDER BY" from C API (works from command-line tool mysql.exe) | Benjamin Pflugmann | 5 Nov |
| • Re: Problems with "ORDER BY" from C API (works from command-line tool mysql.exe) | Paul DuBois | 5 Nov |
| • RE: Problems with "ORDER BY" from C API (works from command-line tool mysql.exe) | at Home \ ) | 5 Nov |
