Received: from mail.ocol.com (IDENT:qmailr@mail.ocol.com [204.244.123.209]) by hub.org (8.9.3/8.9.3) with SMTP id NAA29787 for ; Mon, 14 Jun 1999 13:25:34 -0400 (EDT) (envelope-from kvp@mail.ocol.com) Received: (qmail 24827 invoked from network); 14 Jun 1999 17:42:49 -0000 Received: from hamilton.ocol.com (HELO mail.ocol.com) (@204.244.123.1) by mail.ocol.com with SMTP; 14 Jun 1999 17:42:49 -0000 Message-ID: <37652CF4.15902D19@mail.ocol.com> Date: Mon, 14 Jun 1999 10:25:24 -0600 From: Ken Plumbly X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: order by in c code?? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I am writing an ap in c, everything works fine except the order by portion of my query. I am generating my query like this: sprintf(querystr, "select * from %s order by %s", table, field); however, the returned query is not sorted, it comes out as the order the data is stored in the table. Any ideas???? Thanks. ken kvp@ocol.com