From: Volkan YAZICI <volkan.yazici@gmail.com>
To: pgsql-php@postgresql.org
Subject: Does php/postgres support placeholder's?
Date: Thu, 28 Apr 2005 13:53:35 +0300
Message-ID: <7104a7370504280353ff053cf@mail.gmail.com> (raw)
In-Reply-To: <7104a73705042714542c1131c2@mail.gmail.com>
References: <IHEBIKJHMMKHJKLKCDHLCEOKEIAA.jtmohr@healthconresources.com>
<7104a73705042714542c1131c2@mail.gmail.com>
Hi,
On 4/27/05, John Mohr <jtmohr@healthconresources.com> wrote:
> Does php/postgres support placeholder's in queries and updates. Something
> that looks like "select * from x where key=?" ?
I think you meant parameters by "placeholders". For example:
INSERT INTO tbl (f1, f2, f3...) VALUES ($1, $2, $3, ...);
SELECT count(oid) FROM tbl WHERE field = $1;
AFAIC, PHP PostgreSQL API doesn't support any X_params() functions.
(Seems like stucked in escapeThatBuggyString() functions.)
> I notice that the call
> interface doesn't support all of the documented calls, for example pg_query
> and pg_send_query, but not pg_query_params (according to pgsql.c, the
> postgres php -> postgres interface program).
Some of the functions I found that don't exist in both latest release
and CVS tree:
pg_prepare()
pg_query_params()
pg_field_type_oid()
pg_send_prepare()
pg_send_query_params()
(CVS checkout for ext/pgsql/pgsql.c:
http://cvs.php.net/co.php/php-src/ext/pgsql/pgsql.c?r=1.244.2.38)
Also, async query functions' interface is new as well. (Committed @
"Sat Mar 19 03:46:55 2005" Related diff:
http://cvs.php.net/php-src/ext/pgsql/pgsql.c?r1=1.315&onb=0)
Regards.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: volkan.yazici@gmail.com
Subject: Re: Does php/postgres support placeholder's?
In-Reply-To: <7104a7370504280353ff053cf@mail.gmail.com>
References: <IHEBIKJHMMKHJKLKCDHLCEOKEIAA.jtmohr@healthconresources.com> <7104a73705042714542c1131c2@mail.gmail.com> <7104a7370504280353ff053cf@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox