Re: Variable question...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxxxx] 
> 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
> 


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html





[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux