RE: Variable question...

From: "Christian Marschalek" <cm(at)chello(dot)at>
To: "'Chris Smith'" <csmith(at)squiz(dot)net>
Cc: "[PHP] PostgreSQL" <pgsql-php(at)postgresql(dot)org>
Subject: RE: Variable question...
Date: 2001-05-10 01:04:58
Message-ID: 000701c0d8ed$3d6ee360$0200a8c0@server
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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(at)squiz(dot)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
>

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Steve Werby 2001-05-10 04:36:46 Re: PHP calling PHP?
Previous Message Christian Marschalek 2001-05-10 00:55:49 RE: Variable question...