CodeIgniter for Oracle: ADOdb Database Abstraction vs CodeIgniter Database Library

Early last year, I got the chance to learn and develop a huge web application using CodeIgniter PHP Framework. It was my first project using the framework so at that time we have decided to avoid using CodeIgniter default Database Library in fear of incompatibility with oci8 or Oracle10g.

Only afterward did I got a chance to test out CodeIgniter Database Library or ActiveRecord Library on project using MySQL. At this point, the simplicity of ActiveRecord really caught my attention but how would it be enough compared to ADOdb when using Oracle Database?
[Click here to read more...]

SelectLimit Error On ADOdb using Oracle’s oci8

I faced this problem during the development using CodeIgniter, ADOdb for PHP and Oracle 10g. In the application we utilize the query statement using bind paramater (BindByName or inParameter in ADOdb) which is very helpful in preparing long query while making it easily maintainable.

Sometime we also include additional bind parameter which might not be use in the query it self based our condition statement which would throw a Warning in oci8. However ADOdb does have a good exception handling to cater this issue but in our case it break when we use SelectLimit with offset > 100.

[Click here to read more...]

MONTHS_BETWEEN Query in Oracle

Detect number of months between two date:

SELECT MONTHS_BETWEEN(SYSDATE, TO_DATE('2009-01-01', 'YYYY-MM-DD')) AS MON
FROM DUAL;