Re: PHP and table/view names with '$'
| From: | Yves Sucaet | Date: | Thu, 23 Apr 2009 10:35:53 +0000 |
| Subject: | Re: PHP and table/view names with '$' | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-46134@lists.php.net to get a copy of this message | ||
What if you use back-quotes `` around the table/view name?
$stmt = OCIParse($conn, "SELECT * FROM
v$sql");
----- Original Message ----- From: <N.A.Morgan@bton.ac.uk>
To: "Mark Casson" <confused@icube.co.uk>; <php-db@lists.php.net>
Sent: Thursday, April 23, 2009 5:25 AM
Subject: RE: [PHP-DB] 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@icube.co.uk] Sent: 23 April 2009 11:04
To: php-db@lists.php.net
Subject: [PHP-DB] 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