Skip site navigation (1) Skip section navigation (2)

Re: newbie libpq question...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Doug Homoelle <homoelle(at)ll(dot)mit(dot)edu>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: newbie libpq question...
Date: 2004-11-08 23:17:31
Message-ID: 11698.1099955851@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
Doug Homoelle <homoelle(at)ll(dot)mit(dot)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

Responses

pgsql-interfaces by date

Next:From: D'Arcy J.M. CainDate: 2004-11-08 23:21:55
Subject: Re: newbie libpq question...
Previous:From: Doug HomoelleDate: 2004-11-08 22:36:09
Subject: newbie libpq question...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group