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

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

 



Mark Casson wrote:

> 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

Try enclosing your query in single quotes so php doesn't try to expand what
it sees as the variable $sql. For example

$stmt = OCIParse($conn, 'SELECT * FROM v$sql');


Cheers
-- 
David Robley

I am Homer of Borg. Prepare to be assim... mmmm, donuts.
Today is Pungenday, the 40th day of Discord in the YOLD 3175. 


-- 
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