Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcdXP-0005y6-Im for pgsql-php@arkaria.postgresql.org; Sat, 02 Nov 2013 15:54:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VcdXP-0006aC-2D for pgsql-php@arkaria.postgresql.org; Sat, 02 Nov 2013 15:54:59 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcdXO-0006a6-73 for pgsql-php@postgresql.org; Sat, 02 Nov 2013 15:54:58 +0000 Received: from mail-ea0-x231.google.com ([2a00:1450:4013:c01::231]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcdXG-0005qD-CN for pgsql-php@postgresql.org; Sat, 02 Nov 2013 15:54:57 +0000 Received: by mail-ea0-f177.google.com with SMTP id f15so2523146eak.8 for ; Sat, 02 Nov 2013 08:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=CsUApX6rB8NPUf1Jb3Bnn+1PURy3JkA0yUWJs8raKOo=; b=t/sudbl4mbohSXJTNglgpsEr5lQ73Rw+YCaPAzjjvgTYAEltsNsgsAQhjLUHhApuQk 0/MqQV8/w01SrqqG1YROZjWW11Z924QtPMibN1O9MkuFk+Zsvoyg0I3g9pi00vfJ0vKK tNr/jdCTkQQQWoQ68JdBBs8pCeo02fXSKrf2btDiDGrkRtqUc2z23HDeMr4SMB/rvFSK VzfB0YxcpjJNsRghVvUM6KJCvEFGxUF2zEJjfAZuyt5EZJMkoKGzAboKTWCnpmRYzp+c eZFrSHaMNI16x+q5Rp5/Kl0CmFwYdvZCPsL1e3SuSPT9ytrQ+5OUL3RutoReSxuriaYd 8T8w== X-Received: by 10.14.201.9 with SMTP id a9mr8314010eeo.28.1383407689175; Sat, 02 Nov 2013 08:54:49 -0700 (PDT) Received: from [192.168.178.36] (byrt-4dbff403.pool.mediaWays.net. [77.191.244.3]) by mx.google.com with ESMTPSA id s3sm22051251eeo.3.2013.11.02.08.54.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Nov 2013 08:54:48 -0700 (PDT) Message-ID: <5275203C.2090007@gmail.com> Date: Sat, 02 Nov 2013 16:54:36 +0100 From: Michael Schmidt User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: PHP PDO getting data from pgSQL stored function Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.7 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-php Precedence: bulk Sender: pgsql-php-owner@postgresql.org Hi guys, i need to do a ugly select which i dont want to place in my php code. I use PDO all the time. I want to return a structure which is the same as a table i have created. I want to write it in pgSQL. Now my question, how can i return that and access it with PHP PDO? Should I use a cursor or shoul I use the return of the function (if it is possible)? Can someone provide a piece of example code? Thanks for help -- Sent via pgsql-php mailing list (pgsql-php@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-php