473,382 Members | 1,247 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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(ADODB_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...

May 28 '06 #1
2 3648
b00x wrote:
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(ADODB_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...


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.
js*******@attglobal.net
==================
May 28 '06 #2
If you say so

May 28 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Stefan Richter | last post by:
Hi, I want to create an associative Array with a PHP variable (article ID) as Key and another associative array as it's value. How do I instanciate it, how can I fill it? I want something...
27
by: Abdullah Kauchali | last post by:
Hi folks, Can one rely on the order of keys inserted into an associative Javascript array? For example: var o = new Object(); o = "Adam"; o = "Eve";
6
by: mark4asp | last post by:
Suppose I have the following code. It functions to randomly select a city based upon the probabilities given by the key differences in the associative array. . Eg. because the key difference...
4
by: Robert | last post by:
I am curious why some people feel that Javascript doesn't have associative arrays. I got these definitions of associative arrays via goggle: Arrays in which the indices may be numbers or...
8
by: Derek Basch | last post by:
Is there any way to associate name/value pairs during an array initialization? Like so: sType = "funFilter" filterTypeInfo = ; filterTypeInfo = new Array("type" : sType); I can do it using...
7
by: Robert Mark Bram | last post by:
Hi All! How do you get the length of an associative array? var my_cars= new Array() my_cars="Mustang"; my_cars="Station Wagon"; my_cars="SUV"; alert(my_cars.length);
41
by: Rene Nyffenegger | last post by:
Hello everyone. I am not fluent in JavaScript, so I might overlook the obvious. But in all other programming languages that I know and that have associative arrays, or hashes, the elements in...
11
by: Bosconian | last post by:
I'm trying to output the contents of an array of associative arrays in JavaScript. I'm looking for an equivalent of foreach in PHP. Example: var games = new Array(); var teams = new...
2
by: Venkatesh | last post by:
Hi All, I have one small doubt regarding associative arrays. Request somebody to clarify. Is there a javascript utility function (like split) to convert a string to associative array? My...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.