X-Original-To: pgsql-php-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 0FFD59FB2CA; Thu, 10 Aug 2006 03:13:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 87494-02; Thu, 10 Aug 2006 06:12:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from a2s5.a2hosting.com (host-209-124-50-10.a2webhosting.com [209.124.50.10]) by postgresql.org (Postfix) with ESMTP id 1DF7D9FB2C1; Thu, 10 Aug 2006 03:12:58 -0300 (ADT) Received: from adsl-155-100-31.tys.bellsouth.net ([72.155.100.31] helo=[192.168.1.10]) by a2s5.a2hosting.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.52) id 1GB3mo-0005py-9N; Thu, 10 Aug 2006 02:12:54 -0400 In-Reply-To: <44DAAB2A.7090904@productivitymedia.com> References: <20060731041644.32247.qmail@web56610.mail.re3.yahoo.com> <7F7548C8-249E-44E2-8205-6C055671DA19@pgedit.com> <44DA9BA3.2020801@productivitymedia.com> <44DAAB2A.7090904@productivitymedia.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: Lista PG-PHP , PostgreSQL SQL List Content-Transfer-Encoding: 7bit From: John DeSoi Subject: Re: PL/pgSQL and PHP 5 Date: Thu, 10 Aug 2006 02:12:08 -0400 To: PostgreSQL Admin X-Mailer: Apple Mail (2.752.2) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2s5.a2hosting.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - pgedit.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200608/13 X-Sequence-Number: 3584 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