From: Gary Chambers <gwchamb@gmail.com>
To: David Harel <hareldvd@gmail.com>
Cc: postgres sql <pgsql-sql@postgresql.org>
Subject: Re: user function and bind
Date: Wed, 19 May 2010 13:16:09 -0400
Message-ID: <AANLkTimRVMixtmFlY3vU0766Ep4_rvAoA_oJnQZGsUuR@mail.gmail.com> (raw)
In-Reply-To: <4BF3FC34.3050006@gmail.com>
References: <4BF3FC34.3050006@gmail.com>
David,
> I need an example how to write user function with columns binding and how to
> use it on PHP
If I'm understanding your request correctly:
$dbh = pgpconnect("dbname=db host=dbhost user=dbuser password=pw");
$query = 'SELECT * FROM table WHERE x=$1 AND y=$2 AND z=$3';
$stmt = pg_query_params($dbh, $query, array($x, $y, $z));
-- Gary Chambers
/* Nothing fancy and nothing Microsoft! */
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gwchamb@gmail.com, hareldvd@gmail.com
Subject: Re: user function and bind
In-Reply-To: <AANLkTimRVMixtmFlY3vU0766Ep4_rvAoA_oJnQZGsUuR@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