Jump to content

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


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 comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.