Received: from viemta04.chello.at (viemta04.chello.at [195.34.133.54]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4A13fA00712 for ; Wed, 9 May 2001 21:03:41 -0400 (EDT) (envelope-from cm@chello.at) Received: from server ([212.17.110.55]) by viemta04.chello.at (InterMail vK.4.03.02.00 201-232-124 license 6aea1bd1f01aef5a9a73363c16ebee43) with ESMTP id <20010510010336.ITPP2375.viemta04@server>; Thu, 10 May 2001 03:03:36 +0200 From: "Christian Marschalek" To: "'Chris Smith'" Cc: "[PHP] PostgreSQL" Subject: RE: Variable question... Date: Thu, 10 May 2001 03:04:58 +0200 Message-ID: <000701c0d8ed$3d6ee360$0200a8c0@server> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <01051010485700.20486@area51.cybersydney.com.au> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200105/53 X-Sequence-Number: 362 Thanks :) Got that answer just a moment ago... I'm doing this in another script anyway... *dizzy* Well now it would be interessting to know how to accomplish this without this "work around". The PHP authors must have thought about a way to use variables with text marks inside strings, don't they? regards > -----Original Message----- > From: Chris Smith [mailto:csmith@squiz.net] > Sent: Thursday, May 10, 2001 2:49 AM > To: Christian Marschalek; [PHP] PostgreSQL > Subject: Re: [PHP] Variable question... > > > 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 >