In my apprenticeship as computer scientist, I’m developing several applications. But now at the end of my apprenticeship i have an IPA (Individual productive work in german Individuelle Produktiv Arbeit). In this work I have to develop a webfrontend in PHP for an application that runs with IBM DB2.
I’ve searched the world wide web for an how to or a tutorial. But I don’t have found any clever hints.
Here is an expample how to connect PHP5 with a IBM DB2 Database in Windows!
First you have to uncomment the following line in your php.ini
extension=php_pdo_odbc.dllAt the second step you have to restart your webserver. In my case it is an Apache Webserver
Now you are ready to connect with PHP to your IBM DB2 Database.
Here is an example:
This code displays you the table (in my case
dbiin) which you have selected by the select statement.
Here is my result:
You can download the source here.
Tags: Database, DB2, IBM, PHP Tutorials

hy really nice blog,
just wana ask what theme do you juse?
can i have it to??
lg chris
hi chris!
It’s the fSpring theme from http://www.fahlstad.se/
Greets
Silas
Warum nutzt du den “langsameren” ODBC Treiber und nicht den offiziellen Treiber von IBM ?
http://pecl.php.net/package/ibm_db2/
http://de.php.net/db2
Der ist von der Performance um einiges besser.
tjaa das weiss ich jetzt auch nicht so genau
das ist ja jetzt schon ein weilchen her
aber danke für den hinweis!