I'm new to Oracle and am trying to pull information from Oracle into a web page.
PHP Version 5.2.1
Apache 2.0.55
When I just do a basic query the results return fine but when I use double quotes in my php to I can include a WHERE statment I start getting errors
here are 2 examples of the code i'm using:
Works But can't use a WHERE statment:
$db_conn = ocilogon("xxxxxx", "xxxxxx", "xxxxxx");
$cmdstr = 'select app_user from application$_user';
Doesn't work with Double Quotes in the query:
$db_conn = ocilogon("xxxxxx", "xxxxxx", "xxxxxxx");
$cmdstr = "select app_user from application$_user where app_user = 'BLAH'";
Warning: ociexecute() [function.ociexecute]: ORA-00942: table or view does not exist in C:\Program Files\Apache Group\Apache2\htdocs\opera\myconnectiontest7.php on line 7
Last edited by csolano702; 02-14-2007 at 03:15 PM.
Thanks for the responce.. I tried the query but php is barking at me for it.
$cmdstr = 'select app_user from application$_user where = "BLAH"';
Error:
Warning: ociexecute() [function.ociexecute]: ORA-00904: "BLAH": invalid identifier in C:\Program Files\Apache Group\Apache2\htdocs\opera\myconnectiontest7.php on line 7
Warning: ocifetchstatement() [function.ocifetchstatement]: ORA-24374: define not done before fetch or execute and fetch in C:\Program Files\Apache Group\Apache2\htdocs\opera\myconnectiontest7.php on line 9
This is so confusing I know I should be able to use double quotes and it works fine with Sql, I wonder if it is maybe a configuration change that needs to be done in php.ini??
Bookmarks