ORA-00904: invalid identifier
Solved
gamp
-
X-DBA -
X-DBA -
Hello,
I am developing an application in PHP with Oracle Database 10g Express Edition. I managed
to connect to the database but I am unable to interact with the tables. Here is my test code:
the result:
connection OK
Warning: oci_execute() [function.oci-execute]: ORA-00904: "NOM" : invalid identifier in E:\wamp\www\stage\essay.php on line 14
Warning: oci_fetch_assoc() [function.oci-fetch-assoc]: ORA-24374: definition not executed after fetch or execute and fetch in E:\wamp\www\stage\essay.php on line 16
Please help me.
Configuration: Windows XP / Internet Explorer 8.0
I am developing an application in PHP with Oracle Database 10g Express Edition. I managed
to connect to the database but I am unable to interact with the tables. Here is my test code:
<?php // connection.php connects to the database. $username="HR"; $password="hr"; $db="//localhost/XE"; $conn = oci_connect($username, $password,$db); if ($conn) echo " connection OK"; else echo" bad"; $stmt = oci_parse($conn, "SELECT NOM FROM DBA_TABLES WHERE TABLE_NAME ='serge'"); $r=oci_execute($stmt); while ( $row = oci_fetch_assoc($stmt) ) { print_r($row); } oci_free_statement($stmt); oci_close($conn); ?> the result:
connection OK
Warning: oci_execute() [function.oci-execute]: ORA-00904: "NOM" : invalid identifier in E:\wamp\www\stage\essay.php on line 14
Warning: oci_fetch_assoc() [function.oci-fetch-assoc]: ORA-24374: definition not executed after fetch or execute and fetch in E:\wamp\www\stage\essay.php on line 16
Please help me.
Configuration: Windows XP / Internet Explorer 8.0
He could initially replace his query with the simple query below that returns a list of table names:
"SELECT TABLE_NAME FROM DBA_TABLES"
Also, here is information about the ORA-00904 error: http://www.oracle-error.com/9i/ORA-00904.html