Jump to content

Error in oci_parse(), oci_execute()... What can I do?


gratsami

Recommended Posts

Hello ,

 

I faced a problem with OCI , iam using Xampp 1.7.3 , Oracle 10g (Express edition).

i installed instantclient_11_2 and also defined in Environment Variables (Name: instantclient_11_2, Value: C:\instantclient_11_2), and i uncomment (extension=php_oci8.dll) from php.ini

 

i wrote class for make all oci functions i needed but there isn't any success else in oci connection.

then i wrote this code:

 

<?php
$conn = oci_connect('hereismyusername', 'hereismypassword', '//localhost/xe');
if ($conn) {
print 'Successfully connected to Oracle Database XE!';
//oci_close($conn);
} else {
$errmsg = oci_error();
print 'Oracle connect error: ' . $errmsg['message'];
}
$s = oci_parse($conn, "select * from villages");
$b = oci_execute($s);
if(!$b){
$errmsg = oci_error();
}else{
while ($res = oci_fetch_array($s, OCI_ASSOC)) {
	echo $res['Village_id'] . ', ' . $res['Village_name'] . "<br />";
}
}
?>

 

but this Message appeared:

Successfully connected to Oracle Database XE!

Warning: oci_execute() [function.oci-execute]: ORA-00942: table or view does not exist in C:\xampp\htdocs\ociDB\example2.php on line 11

 

that is mean i success in connection.

but what is the problem in the next message?

 

plz help...

 

Sami

 

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.