ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

is Oracle good enough with Codeigniter ?

June 12, 2008 2:25pm

Subscribe [6]
  • #1 / Jun 12, 2008 2:25pm

    adwin

    77 posts

    Hi,

    I was asked to do a project using php and oracle. I think I will use Codeigniter for this project. I was doing another project using mysql and codeigniter and everything works very well… can i get the same thing with oracle ?

    has you ever using oracle (10g or XE) with Codeigniter (1.62) in your project ? and tell me is it nice enough or i should use another one.

    I also thinking to use php doctrine as orm in that project. is php doctrine compatible enough with oracle ? (just for doing insert update delete trigger and some store procedures)

    thanks

  • #2 / Jun 13, 2008 12:20am

    James Bolongan

    18 posts

    I can say Code igniter is the best web application framework espicially in dealing with any databases…...

    Yes, oracle is good with code igniter and it is really easy to connect in the db just like the way youve done in mysql…..

    Actually our first project use a an oracle10g and we try to use the CI and it seems that it can do a lot of functionalities like insert,update,delete and search and it is easy to configure the config folder.

  • #3 / Jun 13, 2008 12:22am

    James Bolongan

    18 posts

    Just use to the oci8 driver to connect in the database and you can see that it just really the same in connecting in mysql….

  • #4 / Jun 13, 2008 1:20am

    adwin

    77 posts

    how about using oracle and the active record in ci ?
    is AC able to generate syntax like in oracle (for example, join in mysql and oracle are different)

  • #5 / Jun 13, 2008 1:54am

    James Bolongan

    18 posts

    Based on our project, there is no problem about on the Active Record Class of the CI.

    Actually, you have the option to use either to use the active record class or just do a simple query.

    example1:using active record class

    $where = "where A.id = B.id";
            $this->db->where($where);
            $this->db->orderby('A.id');
            $this->db->get('A,B'');

    example2:(simple query)

    $this->db->query("select * from A,B where A.id = B.id order by A.id asc");

    Best on my experience, I already connect to a database like Interbase, Oracle, Postgrey, MSSQL, MYSQL using the CI.
    And most of the libraries of CI really works and theres is no problem I enountered.

  • #6 / Jun 13, 2008 3:09am

    sikkle

    325 posts

    All true 😊

  • #7 / Jun 13, 2008 3:17am

    xwero

    4145 posts

    example1:using active record class

    $where = "where A.id = B.id";
            $this->db->where($where);
            $this->db->orderby('A.id');
            $this->db->get('A,B'');

    shouldn’t that be

    $where = "A.id = B.id"; // removed where
            $this->db->where($where);
            $this->db->orderby('A.id');
            $this->db->get('A,B'');

    i’m a nitpicking fool 😉

  • #8 / Jun 13, 2008 4:18pm

    Derek Allard

    3168 posts

    AR should abstract out the syntactic differences for you, but the Oracle lib was originally built for oci8.  While its largely compatible, some users have reported troubles with Oracle that have never been fully investigated.

  • #9 / Jun 13, 2008 11:34pm

    adwin

    77 posts

    AR should abstract out the syntactic differences for you, but the Oracle lib was originally built for oci8.  While its largely compatible, some users have reported troubles with Oracle that have never been fully investigated.

  • #10 / Jul 05, 2008 8:29pm

    tau-lepton

    1 posts

    I’m currently using CI (Active Record) with Oracle 10.3 and it works very well in general. 

    The one issue that I have not been able to resolve to my satisfaction is the apparent caching of queries or their results; not sure which.  The behavior is that if more than one query is made in a request then only the first query returns the expected result, subsequent queries seem to return the same result as the first query.  This may well have something to do with my Oracle or CI settings, or my inexperience with CI (1 month).

    I was able to work around the problem by making a small edit to the CI oracle driver; I’m not really happy with this solution, I’m probably missing some functionality in CI to clear the previous query.  I’ll post the edit that I made if someone wants it, I’m not posting it now because it probably does more harm than good. 

    —On a side note I am also hitting an AS400 machine (running db2 v5.4) successfully using the ODBC driver.

  • #11 / Jul 06, 2008 1:29am

    kgill

    231 posts

    I was able to work around the problem by making a small edit to the CI oracle driver; I’m not really happy with this solution, I’m probably missing some functionality in CI to clear the previous query.  I’ll post the edit that I made if someone wants it, I’m not posting it now because it probably does more harm than good.

    Search the forums for oracle and you’ll probably find your edit has already been posted and it does more good than harm. I also wouldn’t worry too much about missing out the caching functionality. From what I remember the DB cache system serializes the result set and writes it out to the file system, then uses that for each subsequent query until you clear it manually. For the most part you’re going to want to pull the latest info in your selects so you don’t miss much - at least oracle will automatically cache the execution plan so you do get some speed boost.

    As for the original poster’s question about CI and Oracle, I’d say it’s fine for production - we’ve used it on one of our production sites (10.2) for over a year now without problems.

    - K

  • #12 / Sep 12, 2008 5:35pm

    411161

    3 posts

    This post says that Oracle/CI/AR is production ready but another post showed where I needed to edit the DB_driver.php file. I am using 1.6.3.

    And this is what I get:

    A PHP Error was encountered

    Severity: Warning

    Message: ociparse() expects parameter 1 to be resource, boolean given

    Filename: oci8/oci8_driver.php

    Line Number: 160

    A PHP Error was encountered

    Severity: Warning

    Message: ocisetprefetch() expects parameter 1 to be resource, null given

    Filename: oci8/oci8_driver.php

    Line Number: 145

    A PHP Error was encountered

    Severity: Warning

    Message: ocifetchinto() expects parameter 1 to be resource, null given

    Filename: oci8/oci8_result.php

    Line Number: 159

  • #13 / Oct 06, 2008 11:00am

    Pesse

    2 posts

    I have exactly the same problem. Couldn’t find any solution in the forum.
    What can I do?

    Greetings,
    Pesse

  • #14 / Oct 06, 2008 3:10pm

    dpgtfc

    47 posts

    I’ve had similar problems with oracle and posted them on this forum with no response.  Not sure if enough people are using oracle to have a good base for troubleshooting problems.  Until I get a response I just connect and run queries from my models in the old fashion way.  Too bad though, about the lack of support for oracle here.

  • #15 / Oct 07, 2008 4:28am

    Pesse

    2 posts

    Ok, I discovered that I had a connection problem. I deleted the @ from the ocilogon-functions in oci8_driver.php and - hey - I got error messages 😊
    Have some problems with fetchinto at the moment, I’ll report here when I were able to solve them.

    Pesse

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases