Phalcon Oracle在查询执行中抛出错误findFirst

时间:2016-08-31 10:44:04

标签: oracle pdo phalcon

我正在使用连接到oracle db的phalcon应用程序。

当我尝试调用本机模型函数findFirst('id = 23')时,它抛出Pdoexception并且查询字符串变得不同,下面是查询字符串。

SELECT Z2.* FROM (SELECT Z1.*, ROWNUM DB_ROWNUM FROM ( SELECT BANKS.ID, BANKS.ID, BANKS.ID, BANKS.ID, BANKS.NAME, BANKS.NAME, BANKS.CODE, BANKS.CODE, BANKS.LOGO_IMAGE, BANKS.LOGO_IMAGE, BANKS.REF_NUMBER_HELP_IMAGE, BANKS.REF_NUMBER_HELP_IMAGE, BANKS.USSD_NUMBER FROM BANKS WHERE BANKS.ID = 23 ) Z1 ) Z2 WHERE Z2.DB_ROWNUM BETWEEN 1 AND 1

在上面的查询字符串中,我得到id列4次,名称列2次,依此类推。由于我得到错误的查询

**OCIStmtExecute: ORA-00918: column ambiguously defined.**

任何建议都是可以接受的。

0 个答案:

没有答案