Re: Re: PHP and table/view names with '$'
| From: | Christopher Jones | Date: | Wed, 29 Apr 2009 18:56:43 +0000 |
| Subject: | Re: Re: PHP and table/view names with '$' | ||
| References: | 1 2 3 4 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-46154@lists.php.net to get a copy of this message | ||
With PHP 5.3 the "nowdocs" syntax will make quoting SQL easier: http://blogs.oracle.com/opal/2008/02/php_53_nowdocs_make_sql_escapi.html
Chris
Mark Casson wrote:
i was absolutely convinced that i tried to escape the $ and it hadn't worked and got side tracked looking at other options . . . but yes, that indeed works perfectly. Thanks a lot! ""Yves Sucaet"" <yves.sucaet@usa.net> wrote in message news:007d01c9c404$97d4d1b0$0402a8c0@rincewind...-- Email: christopher.jones@oracle.com Twitter: http://twitter.com/ghrd Free PHP Book: http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdfSwitch back to double quotes? :-) $stmt = OCIParse($conn, "SELECT * FROM v\$sql WHERE INSTR(SQL_TEXT,'something')>0"); ----- Original Message ----- From: "Mark Casson" <confused@icube.co.uk> To: <php-db@lists.php.net> Sent: Thursday, April 23, 2009 6:10 AM 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"" <confused@icube.co.uk> wrote in message news:89.4E.33545.C2D30F94@pb1.pair.com...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