Author Topic: Error in oci_parse(), oci_execute()... What can I do?  (Read 1809 times)

0 Members and 1 Guest are viewing this topic.

Offline gratsamiTopic starter

  • Irregular
  • Posts: 18
    • View Profile
Error in oci_parse(), oci_execute()... What can I do?
« on: August 28, 2010, 05:43:57 PM »
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($sOCI_ASSOC)) {
	
	
echo 
$res['Village_id'] . ', ' $res['Village_name'] . "<br />";
	
}
}
?>


but this Message appeared:
Quote
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?

please help...

Sami

Offline gratsamiTopic starter

  • Irregular
  • Posts: 18
    • View Profile
Re: Error in oci_parse(), oci_execute()... What can I do?
« Reply #1 on: August 29, 2010, 08:36:52 AM »
there isn't a problem.

the problem from my Database structure.

Sami