logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: newbie libpq question...: msg#00009

Subject: Re: newbie libpq question...
Doug Homoelle <homoelle@xxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html



<Prev in Thread] Current Thread [Next in Thread>