我正在尝试使用输入来更新数据库,但它会返回ORA-01747:无效的user.table.column,table.column或列规范。我不是SQL专业人士,但我的脚本没有看到任何错误。我检查了一下,列名与我的数据库完全相同。
有人创意吗?
public function updateDepotMethodQuanti($params) {
$sQuery = 'UPDATE depot
SET
depot.METHOD_SUPV = :0,
depot.CODE_ETAB_RGLT = :3,
depot.DATE_RGLT = :4,
depot.MONTANT_RGLT = :5,
depot.NUMERO_RGLT = :6,
depot.COMMENTAIRE = :7,
depot.BT_COMM_FACTU = :2,
WHERE depot.ID_DEPOT = :1';
// mise à jour method_supv
$mResult1 = $this->executeQueries($sQuery,array($params['newMethodQuanti'], $params['idDepot'], $params['checkCommentaire'], $params['codeEtabliReglement'],
$params['dateReglement'], $params['montant'], $params['numReglement'], $params['motifChangement']
));
if ($mResult1 !== false) {
$this->commit();
} else {
$this->rollback();
}
}
executeQueries函数是一个函数,允许我使用诸如depot.METHOD_SUPV = :0,
之类的键
我的日志:
2019-03-08T11:35:25+01:00 ERR (3): Exception : array (
'code' => 1747,
'message' => 'ORA-01747: sp�cification utilisateur.table.colonne,table.colonne ou colonne non valide',
'offset' => 337,
'sqltext' => 'UPDATE depot
SET
depot.METHOD_SUPV = :0,
depot.CODE_ETAB_RGLT = :3,
depot.DATE_RGLT = :4,
depot.MONTANT_RGLT = :5,
depot.NUMERO_RGLT = :6,
depot.COMMENTAIRE = :7,
depot.BT_COMM_FACTU = :2,
WHERE depot.ID_DEPOT = :1',
)
2019-03-08T11:35:25+01:00 ERR (3): Error parameter : array (
0 => '2',
1 => '22781811',
2 => '1',
3 => '542252',
4 => '2019-02-25',
5 => '42542',
6 => '2452',
7 => 's<fsdfsdf',
)
答案 0 :(得分:1)
在此处删除逗号:
depot.BT_COMM_FACTU = :2, --> here
WHERE depot.ID_DEPOT = :1