From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jackson Ching <jching@imvi.com.ph>
Cc: pgsql-general@postgresql.org
Subject: Re: Getting the result of a query using COUNT(*)
Date: Thu, 24 Aug 2000 23:57:37 -0400
Message-ID: <753.967175857@sss.pgh.pa.us> (raw)
In-Reply-To: <200008250937570530.005FD1CF@mail.imvi.com.ph>
References: <200008250937570530.005FD1CF@mail.imvi.com.ph>
"Jackson Ching" <jching@imvi.com.ph> writes:
> SELECT COUNT(*) FROM MyTable
> in my rs.getint("COUNT(*)");
Offhand I'd guess that the returned column heading is "count" not
"COUNT(*)". Use an AS clause if you want to be sure about the
column heading of a SELECT result...
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, jching@imvi.com.ph, pgsql-general@postgresql.org
Subject: Re: Getting the result of a query using COUNT(*)
In-Reply-To: <753.967175857@sss.pgh.pa.us>
References: <200008250937570530.005FD1CF@mail.imvi.com.ph> <753.967175857@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