From: D'Arcy J.M. Cain <darcy@druid.net>
To: Doug Homoelle <homoelle@ll.mit.edu>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: newbie libpq question...
Date: Mon, 8 Nov 2004 18:21:55 -0500
Message-ID: <20041108182155.086d9d58.darcy@druid.net> (raw)
In-Reply-To: <1099953369.2819.11.camel@>
References: <1099953369.2819.11.camel@>
On Mon, 08 Nov 2004 17:36:09 -0500
Doug Homoelle <homoelle@ll.mit.edu> wrote:
> I'm trying to use the libpq library for the first time and I'm
> experiencing what seems to be a very basic problem. When I run the
> following:
>
> res = PQexec(conn, "select blah blah blah");
> test_int=PQntuples(res);
> fprintf(stdout,"number of rows: %f\n",test_int);
> test_int=PQnfields(res);
> fprintf(stdout,"number of cols: %f\n",test_int);
>
> where "blah blah blah" is the selection criteria, I get zero rows and
I think you need "number of cols: %d\n" there. Those functions returns
int.
--
D'Arcy J.M. Cain <darcy@druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: darcy@druid.net, homoelle@ll.mit.edu
Subject: Re: newbie libpq question...
In-Reply-To: <20041108182155.086d9d58.darcy@druid.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox