YII2 And Oracle PDO Error

I got error

SQLSTATE[HY000]: General error: 942 OCIStmtExecute: ORA-00942: table or view does not exist

(ext\pdo_oci\oci_statement.c:157)
The SQL being executed was: SELECT COUNT(*) FROM “country”

Error Info: Array
(
[0] => HY000
[1] => 942
[2] => OCIStmtExecute: ORA-00942: table or view does not exist
(ext\pdo_oci\oci_statement.c:157)
)

Caused by: PDOException

SQLSTATE[HY000]: General error: 942 OCIStmtExecute: ORA-00942: table or view does not exist

(ext\pdo_oci\oci_statement.c:157)

in C:\xampp\htdocs\basic\vendor\yiisoft\yii2\db\Command.php at line 1293

I Already add table but view this error is table or view does not exist
I using Yii2 version 2.0.34 and PHP 7.3.2

Is it named exactly the same? Are you connecting to the right database?

Sure, name of database and name of table is correcly, i using oracle 12c

Can you do the same query in the database directly?

Thanks you sir to answer my question, i try delete basic project and database and recreate all, but its work, i dont know why, but thanks to answer my question.

1 Like