Re: Query on Oracle Views

From: Date: Tue, 07 Aug 2001 00:44:39 +0000
Subject: Re: Query on Oracle Views
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-11100@lists.php.net to get a copy of this message
on 8/6/01 5:33 PM, Rankin, Randy at randy.rankin@invensys.com wrote: > When I execute this query, the server returns the following error. > Warning: OCIStmtExecute: ORA-00942: table or view does not exist in > /usr/local/apache/htdocs/oracle/oraprod.php on line 17 > > My suspicion is that PHP thinks that the '$' in the table name is the > beginning of a variable. Does anyone know how to get around this so that I > can execute a query with a table name like v$instance? Sure. Either use single quotes: $query = 'SELECT instance_name, host_name FROM v$instance'; Or escape the $: $query = "SELECT instance_name, host_name FROM v\$instance"; HTH. Sincerely, Paul Burney ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Paul Burney Webmaster && Open Source Developer UCLA -> GSE&IS -> ETU (310) 825-8365 <webmaster@gseis.ucla.edu> <http://www.gseis.ucla.edu/> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

« previous php.db (#11100) next »