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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-interfaces by date

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