Using Oracle database with CakePHP 2.0

戏子无情 提交于 2019-11-28 12:26:49

After asking some CakePHP developers I came out with the conclusion that it is not possible to use an Oracle Database with CakePHP 2.3 if you want to make a proper use of CakePHP Models and their query syntax. There's no yet available any driver for Oracle in CakePHP which is completely functional.

Therefore, the solution I found was to use the OCI8 Functions of PHP.

Like this i could use oci_parse to directly query against the DB or rather call a PL-SQL procedure which is what I finally decided to do. (because of the sql functions complexity and the division of task inside my work group)

Now, I can not make use of many of the advantages of using CakePHP models, but It was the only way.

There is a new CakePHP 3 Driver for Oracle Database released (MIT) and working with Oracle 11g and Oracle 12c databases. Some features:

  • Triggers
  • Sequences
  • Cursors
  • Stored procedures
  • Packages
  • All the basic CRUD features to allow select/insert/update/delete rows.
  • CakePHP Pagination
  • CakePHP Bake code generation

Check the Documentation here, and the release announcement here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!