Received: from cooee.cybersydney.com.au (cooee.cybersydney.com.au [203.25.173.1]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4A0n4A96266 for ; Wed, 9 May 2001 20:49:05 -0400 (EDT) (envelope-from csmith@squiz.net) Received: from area51.cybersydney.com.au (csmith@pc163.cybersydney.com.au [203.25.173.163] (may be forged)) by cooee.cybersydney.com.au (8.8.7/8.8.7) with SMTP id KAA32633; Thu, 10 May 2001 10:54:14 +1000 Content-Type: text/plain; charset="iso-8859-1" From: Chris Smith Organization: Squiz To: "Christian Marschalek" , "[PHP] PostgreSQL" Subject: Re: Variable question... Date: Thu, 10 May 2001 10:48:57 +1000 X-Mailer: KMail [version 1.2] References: <000501c0d8e8$f6ab2f00$0200a8c0@server> In-Reply-To: <000501c0d8e8$f6ab2f00$0200a8c0@server> MIME-Version: 1.0 Message-Id: <01051010485700.20486@area51.cybersydney.com.au> Content-Transfer-Encoding: 8bit X-Archive-Number: 200105/51 X-Sequence-Number: 360 Hey, It might not be translating the array contents properly (because of the quotes inside the $HTTP_SESSION_VARS? Not sure)... Try - $result = pg_exec($c1, "SELECT o_plz FROM ort_tabelle WHERE o_plz = ".$HTTP_SESSION_VARS['user_tabelleXu_o_plz']); which basically appends the session variable onto the end of the query.. > Can anyone please tell me why this does not work: > > $result = pg_exec($c1,"SELECT o_plz FROM ort_tabelle WHERE o_plz = > $HTTP_SESSION_VARS['user_tabelleXu_o_plz']"); > > And I have to do the following instead? > > $plz = $HTTP_SESSION_VARS['user_tabelleXu_o_plz']; > $result = query_trans($c1, "SELECT o_plz FROM ort_tabelle WHERE o_plz = > $plz"); -- Chris Smith http://www.squiz.net