From: Christian Marschalek <cm@chello.at>
To: 'Chris Smith' <csmith@squiz.net>
Cc: [PHP] PostgreSQL <pgsql-php@postgresql.org>
Subject: RE: Variable question...
Date: Thu, 10 May 2001 03:04:58 +0200
Message-ID: <000701c0d8ed$3d6ee360$0200a8c0@server> (raw)
In-Reply-To: <01051010485700.20486@area51.cybersydney.com.au>
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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: cm@chello.at, csmith@squiz.net
Subject: Re: Variable question...
In-Reply-To: <000701c0d8ed$3d6ee360$0200a8c0@server>
References: <01051010485700.20486@area51.cybersydney.com.au> <000701c0d8ed$3d6ee360$0200a8c0@server>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox