简体   繁体   English

PHP无法“查看” Oracle表

[英]PHP can't “see” a oracle table

)

I've implemented the oci Extension, and i can connect to the database. 我已经实现了oci Extension,并且可以连接到数据库。

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中工作:

<?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. 并得到ORA-00942错误。

I wrote the same statement inside the sqlDevelopper: 我在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. 似乎我有错误的“数据库”,但据我所知oracle不适用于MySQL之类的单独数据库。

I run Oracle Express 11 and have already granted all to the user. 我运行Oracle Express 11,并且已经将所有权限授予该用户。

Thanks 谢谢

Problem is solved. 问题解决了。

I've granted the wrong user the rights. 我授予了错误的用户权限。

Now with the right user everything is fine :-) 现在有了合适的用户,一切都很好:-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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