X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 697323A4112 for ; Mon, 8 Nov 2004 23:22:10 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76199-09 for ; Mon, 8 Nov 2004 23:22:00 +0000 (GMT) Received: from area51.givex.com (tor149-99-39-156.dedicated.sprintdsl.ca [149.99.39.156]) by svr1.postgresql.org (Postfix) with ESMTP id 899D83A411F for ; Mon, 8 Nov 2004 23:21:59 +0000 (GMT) Received: by area51.givex.com (Postfix, from userid 66) id B6378192AC; Mon, 8 Nov 2004 18:22:33 -0500 (EST) Received: from imp.druid.net (imp.givex.com [192.168.7.111]) by area51.givex.com (Postfix) with SMTP id 8067D19268; Mon, 8 Nov 2004 18:22:32 -0500 (EST) Date: Mon, 8 Nov 2004 18:21:55 -0500 From: "D'Arcy J.M. Cain" To: Doug Homoelle Cc: pgsql-interfaces@postgresql.org Subject: Re: newbie libpq question... Message-Id: <20041108182155.086d9d58.darcy@druid.net> In-Reply-To: <1099953369.2819.11.camel@> References: <1099953369.2819.11.camel@> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386--netbsdelf) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/11 X-Sequence-Number: 5137 On Mon, 08 Nov 2004 17:36:09 -0500 Doug Homoelle 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 | 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.