Skip site navigation (1) Skip section navigation (2)

Does php/postgres support placeholder's?

From: Volkan YAZICI <volkan(dot)yazici(at)gmail(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: Does php/postgres support placeholder's?
Date: 2005-04-28 10:53:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-php

On 4/27/05, John Mohr <jtmohr(at)healthconresources(dot)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:


(CVS checkout for ext/pgsql/pgsql.c:

Also, async query functions' interface is new as well. (Committed @
"Sat Mar 19 03:46:55 2005" Related diff:


In response to

pgsql-php by date

Next:From: Volkan YAZICIDate: 2005-05-01 13:59:01
Subject: Fwd: Bug #32904: pg_get_notify() ignores result_type param.
Previous:From: Christopher Kings-LynneDate: 2005-04-28 01:22:31
Subject: Re: Does php/postgres support placeholder's?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group