Re: Variable question... - Mailing list pgsql-php

From Chris Smith
Subject Re: Variable question...
Date
Msg-id 01051010485700.20486@area51.cybersydney.com.au
Whole thread Raw
In response to Variable question...  ("Christian Marschalek" <cm@chello.at>)
Responses RE: Variable question...
Re: Variable question...
List pgsql-php
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

pgsql-php by date:

Previous
From: "Mitch Vincent"
Date:
Subject: Re: Variable question...
Next
From: "Christian Marschalek"
Date:
Subject: RE: Variable question...