Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    I had been creating my own database abstraction component (with a full SPL-compliant resultset iterator and everytong) and half-way through my research found Creole...

    http://creole.phpdb.org/

    So I'm in the process of installing it for first use. Looks super-simple (and remarkably similar to the DB component I was making). Anyone have any experience with it?

    It works like this:
    PHP Code:
    $connection Creole::getConnection($dsn);
    $stmt $this->prepareStatement("SELECT * FROM table WHERE id = ?");
    $stmt->setInt(1$id);
    $rs $stmt->executeQuery();
    $rs->first();
    $fields $rs->getRow(); 

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    The only two I ever used were the PEAR one and ADOdb. ADOdb seemed nice. That was a while ago, though. Usually I'll just wrap some common functions in my own error handling code. Then again, I've realized that DBALs aren't useful unless I'm making a generic application. The likelihood of an application I'll be managing changing databases is low enough, and I know enough to avoid most issues with that even if that does happen. And it dodges the DBAL overhead, which is nice.

    On the other hand, Creole is unit tested, which is fantabulous.

  4. #3
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Well the app I'm deving right now MIGHT switch to Java, and MIGHT switch to Oracle or Postgres, so Creole seemed like the perfect choice. It's also got (seemingly) little overhead... though I haven't seen benchmarks. Also, the resultset iterator is great!

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    I *seem* to recall something similar in ADOdb, but I haven't played with it in... Well... A while Sounds good, though. I'll file it away in my list of useful tools for PHP.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:46 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com