Using Oracle database with CakePHP 2.0

前端 未结 2 1041
野趣味
野趣味 2020-12-11 06:30

I have noticed there\'s no datasource for Oracle in CakePHP 2.0 for the moment, although it seems they are working on in it now: http://ask.cakephp.org/questions/view/any_ne

相关标签:
2条回答
  • 2020-12-11 06:32

    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.

    0 讨论(0)
  • 2020-12-11 06:45

    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.

    0 讨论(0)
提交回复
热议问题