Re: PHP and table/view names with '$'

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

 



Hi,

For reference, this didn't work, but just using single quotes instead of 
double quotes did.

Mark

""Yves Sucaet"" <yves.sucaet@xxxxxxx> wrote in message 
news:006201c9c3ff$4896f7e0$0402a8c0@xxxxxxxxxxxx
> What if you use back-quotes `` around the table/view name?
> $stmt = OCIParse($conn, "SELECT * FROM `v$sql`");
>
>
> ----- Original Message ----- 
> From: <N.A.Morgan@xxxxxxxxxx>
> To: "Mark Casson" <confused@xxxxxxxxxxx>; <php-db@xxxxxxxxxxxxx>
> Sent: Thursday, April 23, 2009 5:25 AM
> Subject: RE:  PHP and table/view names with '$'
>
>
> I find that using single quotes rather than double quotes prevents
> variable substitution.
>
> I don't know if this is an undocumented feature, as the documentation
> says that both have the same functionality.
>
> Regards, Neil
>
> -----Original Message-----
> From: Mark Casson [mailto:confused@xxxxxxxxxxx] Sent: 23 April 2009 11:04
> To: php-db@xxxxxxxxxxxxx
> Subject:  PHP and table/view names with '$'
>
> Hi,
>
> I am trying to access some of the v$ views using php on iis, with admin 
> privileges.
>
> However, using:
>
> $stmt = OCIParse($conn, "SELECT * FROM v$sql");
>
> gives me this error:
>
> PHP Notice: undefined variable: sql . . .
>
> Is there a way around this?
>
> Thanks
>
> Mark
>
>
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux