PHP ADODB DB2 associative arrays

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • b00x

    PHP ADODB DB2 associative arrays

    I know this doesn't -exactly- match php, but its still related, and
    adodb doesn't have its own google group yet, so i thought I'd go
    generic.

    The problem is, I created a nice little script for Oracle using oci8
    and tried to convert to db2, but ran into issues. In case you don't
    know what ADODB is, checkout http://adodb.sourceforge.net/

    The GetAssoc, or SetFetchMode(AD ODB_FETCH_ASSOC ) methods to get an
    associative array from a DB2 database don't function properly. The
    result of a simple query, for example:
    select firstname, lastname, dob from person
    results in an array something like:
    Array (
    [LASTNAME] => 'Bob'
    [DOB] => 'Henry'
    [0] => '1956-12-01'
    )
    Now -that- is a real pain, and I've tried looking through the db2
    driver, but couldn't pin-point myself where the problem was, as the
    ADODB code is a little out of my league, and the complications of the
    new 'extension' don't help.

    I was just wondering if anyone knows what I'm talking about? Or maybe a
    possible solution to the problem? I'd prefer a solution at the base
    level, not a 'quick-fix', as I use this library often.

    Some further information that might be useful is that i'm running DB2
    v8.2 Enterprise, on WinXP (up-to-date). I'm using the latest ADODB
    4.8.1 (NOT the extension). And i'm using Apache/2.2.2 + PHP/5.1.4
    served on WinXP, same machine as DB2.

    Thanks in advance.

    Regards,
    Corey...

  • Jerry Stuckle

    #2
    Re: PHP ADODB DB2 associative arrays

    b00x wrote:[color=blue]
    > I know this doesn't -exactly- match php, but its still related, and
    > adodb doesn't have its own google group yet, so i thought I'd go
    > generic.
    >
    > The problem is, I created a nice little script for Oracle using oci8
    > and tried to convert to db2, but ran into issues. In case you don't
    > know what ADODB is, checkout http://adodb.sourceforge.net/
    >
    > The GetAssoc, or SetFetchMode(AD ODB_FETCH_ASSOC ) methods to get an
    > associative array from a DB2 database don't function properly. The
    > result of a simple query, for example:
    > select firstname, lastname, dob from person
    > results in an array something like:
    > Array (
    > [LASTNAME] => 'Bob'
    > [DOB] => 'Henry'
    > [0] => '1956-12-01'
    > )
    > Now -that- is a real pain, and I've tried looking through the db2
    > driver, but couldn't pin-point myself where the problem was, as the
    > ADODB code is a little out of my league, and the complications of the
    > new 'extension' don't help.
    >
    > I was just wondering if anyone knows what I'm talking about? Or maybe a
    > possible solution to the problem? I'd prefer a solution at the base
    > level, not a 'quick-fix', as I use this library often.
    >
    > Some further information that might be useful is that i'm running DB2
    > v8.2 Enterprise, on WinXP (up-to-date). I'm using the latest ADODB
    > 4.8.1 (NOT the extension). And i'm using Apache/2.2.2 + PHP/5.1.4
    > served on WinXP, same machine as DB2.
    >
    > Thanks in advance.
    >
    > Regards,
    > Corey...
    >[/color]

    Actually, this has virtually nothing to do with PHP...

    The correct place to ask is on the ADODB forum on SourceForge - which I see you
    have already done.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • b00x

      #3
      Re: PHP ADODB DB2 associative arrays

      If you say so

      Comment

      Working...