Search Postgresql Archives

Examples of using PQexecParams

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was looking for examples of using PQexecParams but all I found was
this: http://sepp.oetiker.ch/postgresql-8.2.3-ds/libpq-example.html

/* Convert integer value "2" to network byte order */
    binaryIntVal = htonl((uint32_t) 2);
/* Set up parameter arrays for PQexecParams */
    paramValues[0] = (char *) &binaryIntVal;
    paramLengths[0] = sizeof(binaryIntVal);
    paramFormats[0] = 1;        /* binary */
...
seems a bit convoluted.

In particular I was looking for an example of setting up a string
parameter for PQexecParams, assuming that is possible.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux