Re: user function and bind

From: Gary Chambers <gwchamb(at)gmail(dot)com>
To: David Harel <hareldvd(at)gmail(dot)com>
Cc: postgres sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: user function and bind
Date: 2010-05-19 17:16:09
Message-ID: AANLkTimRVMixtmFlY3vU0766Ep4_rvAoA_oJnQZGsUuR@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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! */

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message tlange 2010-05-21 00:52:23
Previous Message Justin Graf 2010-05-19 16:11:18 Re: user function and bind