简体   繁体   中英

PHP can't “see” a oracle table

)

I've implemented the oci Extension, and i can connect to the database.

but i can't do anything with the database :-(

on every query i get table or view not found.

i've tried to write a quick test to proof that it works in php:

<?php
    $conn = oci_connection("user", "pass", "localhost/xe");
    $stdi = oci_parse($conn, "SELECT COUNT(*) FROM tests WHERE STATUS =110");
    echo oci_execute($stdi);

and get the ORA-00942 Error.

I wrote the same statement inside the sqlDevelopper:

SELECT COUNT(*) from tests where status = 110;

And get a result.

it seems like i have the wrong "database" but as i know oracle doesn't work with seperate databases like MySQL.

I run Oracle Express 11 and have already granted all to the user.

Thanks

Problem is solved.

I've granted the wrong user the rights.

Now with the right user everything is fine :-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM