RE: [PHP-DB] Re: PHP and table/view names with '$'

[email protected]
Newsgroups php.db
Message-ID <913097E11AB70F4BA5EDF1611ECAA8B903EF6680@EXCHANGE2.university.brighton.ac.uk>
Escape the embedded single quotes i.e. 

$stmt = OCIParse($conn, 'SELECT * FROM v$sql WHERE 
INSTR(SQL_TEXT,\'something\')>0');

Neil

-----Original Message-----
From: Mark Casson [mailto:[email protected]] 
Sent: 23 April 2009 12:10
To: [email protected]
Subject: [PHP-DB] Re: PHP and table/view names with '$'

Hi,

Of course, the next problem is that i want to specify a line to find:

$stmt = OCIParse($conn, 'SELECT * FROM v$sql WHERE 
INSTR(SQL_TEXT,'something')>0');

and i seem to have to use single quotes in the INSTR function.

Is there an alternative way to deal with that?

Thanks again

Mark

""Mark Casson"" <[email protected]> wrote in message 
news:[email protected]...
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.