Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 20AA39F9A43 for ; Mon, 20 Aug 2007 05:57:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 04519-07 for ; Mon, 20 Aug 2007 05:57:45 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from smtp-out01.email.it (smtp-out01.email.it [212.97.34.21]) by postgresql.org (Postfix) with ESMTP id 82B839F9836 for ; Mon, 20 Aug 2007 05:57:49 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out01.email.it (Postfix) with ESMTP id 69A454013 for ; Mon, 20 Aug 2007 10:57:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at email.it Received: from smtp-out01.email.it ([127.0.0.1]) by localhost (smtp-out01.email.it [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8B4uaXz9C+kP for ; Mon, 20 Aug 2007 10:57:44 +0200 (CEST) Date: Mon, 20 Aug 2007 10:57:47 +0200 To: pgsql-admin@postgresql.org From: giuseppe.derossi@email.it Reply-to: giuseppe.derossi@email.it Subject: how to call sql code without function Message-ID: <982e37715bf2f368a09ab98ac244a032@83.225.20.212> X-Priority: X-Mailer: Webmail-Email.it [Mailer version 1.70] X-SenderIP: 83.225.20.212 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/218 X-Sequence-Number: 26549 Hi all, I use Postgresql 8.2 in win env. I wrote a set of complex queries which return three temporary tables of results. I want to use then in php, but the unique way I know consists on sending one query a time via php, the logic I need has now been cablated into the sql code. I could use the functions but it seems a bit long becouse I set some temporary tables and I shoud use dynamic queries and I've more then a recordset. Is there a way to store this piece of sql code into the database and to recall it with the right input by php and to read only the two tables of results via PHP? thanks in advantage giu -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: In REGALO un GIOCO! Scegli GPBikes 3D,Bubble Boom, Rock City Empire Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6732&d=20070820