Answer the question
In order to leave comments, you need to log in
How to remove double quotes when querying oracle db in yii2?
config and other registered I make a simple request
public function actionTest() {
$rows = (new \yii\db\Query())
->select()
->from("mytable")
->limit(10)
->all();
return $rows;
}
SQLSTATE[HY000]: General error: 942 OCIStmtExecute: ORA-00942: table or user view does not exist
(/tmp/pear/download/PDO_OCI-1.0/oci_statement.c:142)
The SQL being executed was:
WITH USER_SQL AS (SELECT * FROM "mytable"),
PAGINATION AS (SELECT USER_SQL.*, rownum as rowNumId FROM USER_SQL)
SELECT *
FROM PAGINATION
WHERE rownum <= 10
return [
'class' => 'yii\db\Connection',
'dsn' => 'oci:dbname=//localhost:1521/ddbm',
'username' => 'name_user',
'password' => 'pasword_user',
'charset' => 'utf-8',
// Schema cache options (for production environment)
// 'enableSchemaCache' => true,
// 'schemaCacheDuration' => 60,
// 'schemaCache' => 'cache',
];
Answer the question
In order to leave comments, you need to log in
an error as I understood that double quotes are substituted in FROM "mytable" without them the request is executed. How to remove them?I suspect that the quotes do not need to be removed and even harmful.
MYTABLE
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question