Thanks. Unfortunately this project is on a windows based platform, but this
may head me in the right direction.


Robert W. Collins II 
Webmaster 
New Orleans Regional Transit Authority 
Phone : (504) 248-3826 
Email : [EMAIL PROTECTED] 



-----Original Message-----
From: Matt Schroebel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 2:46 PM
To: 'Collins, Robert'; 'Rance Hall'; [EMAIL PROTECTED]
Subject: RE: [PHP] AS/400 data access


I just did this on a Linux box running Red Hat 7.2 last Friday.  I used
several sources on the web and wrote up my exact steps and posted them at
http://www.php-faq.com/as400.html The other sources are quoted in that
document.  

Keep in mind, it's not the final version of the document, and I'd appreciate
any feedback.  After I get my app running, I'm going to move it to a FreeBSD
box and document that setup.  I was close to getting it to work on FreeBSD
last week, but decided to get it working with Redhat since that's what the
original docs describe.

I have written a couple of simple scripts that query the db on the AS/400
and display the results.  The performance seems fine. I did find that I had
to explictly state the library name the table is in as part of the sql.  For
instance:
$sql = "select field1, field2 from library.table where key=$id";

If you create a collection with the same name as the user php is connecting
with then you don't need to specify the library.  I need to read up a lot
because there is a way to set the path to multiple
libraries such that I saw in one of the IBM SQL books which is
$query = "SET path library1, library2";
But it wouldn't work for me. If either of you find the solution in the maze
of IBM docs, let me know and I'll add it to the instructions.

Also, you can't single quote numerics like you can in MySQL.

As I said, I just got it working, and will update the document as I learn
more about the pecularities of the AS/400.

Oh, make sure to grab the replacement odbc_fetch_array code in the user
notes at http://www.php.net/manual/en/function.odbc-fetch-array.php

> -----Original Message-----
> From: Collins, Robert [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, April 09, 2002 2:13 PM
> To: 'Rance Hall'; [EMAIL PROTECTED]
> Subject: RE: [PHP] AS/400 data access
> 
> 
> I am also trying to access data on an AS/400 have you gotten 
> it to work, if
> so can you send an example? Thanks in advance.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to