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

From Christian Marschalek
Subject Re: Variable question...
Date
Msg-id 000701c0d8ed$3d6ee360$0200a8c0@server
Whole thread Raw
In response to Re: Variable question...  (Chris Smith <csmith@squiz.net>)
List 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@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
>


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

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




pgsql-php by date:

Previous
From: Steve Bern
Date:
Subject: Re: Using system call + wrapper?
Next
From: Jason k Larson
Date:
Subject: Re: Configure question?