Re: newbie libpq question... - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: newbie libpq question...
Date
Msg-id 11698.1099955851@sss.pgh.pa.us
Whole thread Raw
In response to newbie libpq question...  (Doug Homoelle <homoelle@ll.mit.edu>)
Responses Re: newbie libpq question...  ("Jeroen T. Vermeulen" <jtv@xs4all.nl>)
List pgsql-interfaces
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


pgsql-interfaces by date:

Previous
From: Doug Homoelle
Date:
Subject: newbie libpq question...
Next
From: "D'Arcy J.M. Cain"
Date:
Subject: Re: newbie libpq question...