pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John DeSoi <desoi@pgedit.com>
To: PostgreSQL Admin <postgres@productivitymedia.com>
Cc: Lista PG-PHP <pgsql-php@postgresql.org>
Cc: PostgreSQL SQL List <pgsql-sql@postgresql.org>
Subject: Re: PL/pgSQL and PHP 5
Date: Thu, 10 Aug 2006 02:12:08 -0400
Message-ID: <E09B3902-103E-41D7-A03F-BA8D45BFEFC8@pgedit.com> (raw)
In-Reply-To: <44DAAB2A.7090904@productivitymedia.com>
References: <20060731041644.32247.qmail@web56610.mail.re3.yahoo.com>
	<bf05e51c0607302152k2801caflc9040d99af7b2816@mail.gmail.com>
	<7F7548C8-249E-44E2-8205-6C055671DA19@pgedit.com>
	<bf05e51c0607310759m64d39c45n73aa6060c871b46f@mail.gmail.com>
	<44DA9BA3.2020801@productivitymedia.com>
	<A46E31A9-0484-4CB4-9649-76FADC4F872B@pgedit.com>
	<44DAAB2A.7090904@productivitymedia.com>

Glad you found the problem.

On Aug 9, 2006, at 11:42 PM, PostgreSQL Admin wrote:

> $connection->execute("SELECT insert_staff_b('$staff 
> [insert_firstname]'::varchar)");
> $connection->execute("SELECT insert_staff_b('".$staff 
> ['insert_firstname']."'::varchar)");

If you are creating SQL functions you want to call from PHP, you  
might be interested in this simple class:

http://pgedit.com/resource/php/pgfuncall


Then instead of all the quoting issue you have above, you could  
simply call your SQL function like a normal PHP method call:

$connection->insert_staff_b($staff['insert_firstname']);




John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL




view thread (6+ messages)

Message-ID: <E09B3902-103E-41D7-A03F-BA8D45BFEFC8@pgedit.com>
Permalink:  ../E09B3902-103E-41D7-A03F-BA8D45BFEFC8@pgedit.com/
Also on:    postgresql.org/message-id/E09B3902-103E-41D7-A03F-BA8D45BFEFC8@pgedit.com

 · 

reply

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: desoi@pgedit.com, postgres@productivitymedia.com, pgsql-php@postgresql.org
  Subject: Re: PL/pgSQL and PHP 5
  In-Reply-To: <E09B3902-103E-41D7-A03F-BA8D45BFEFC8@pgedit.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