From: Tom Lane <tgl@sss.pgh.pa.us>
To: Doug Homoelle <homoelle@ll.mit.edu>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: newbie libpq question...
Date: Mon, 08 Nov 2004 18:17:31 -0500
Message-ID: <11698.1099955851@sss.pgh.pa.us> (raw)
In-Reply-To: <1099953369.2819.11.camel@ >
References: <1099953369.2819.11.camel@ >
Doug Homoelle <homoelle@ll.mit.edu> writes:
> 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);
If test_int is an integer, you want %d or %i in the format, not %f ...
regards, tom lane
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: tgl@sss.pgh.pa.us, homoelle@ll.mit.edu
Subject: Re: newbie libpq question...
In-Reply-To: <11698.1099955851@sss.pgh.pa.us>
* 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