Re: HowTo: IBM DB2 w/PHP
| From: | Antonio S. Martins Jr. | Date: | Wed, 31 Jan 2001 10:23:41 +0000 |
| Subject: | Re: HowTo: IBM DB2 w/PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37447@lists.php.net to get a copy of this message | ||
On Tue, 30 Jan 2001, Karl J. Stubsjoen wrote:
> We have succesfully installed the IBM DB2 RDMS on our Linux box and have
> successfully made a connection to our AS400. All through command line
> though.
What are the versions of your AS400 and DB2 for Linux? I had tryied to
connect on an AS400 some time ago without success (both from Linux and
AIX)! And from what I read on that time I tought the only way to connect
to an AS400 is from windows!
> I am new to PHP, and am wondering:
> How do I instantiate the IBM DB2 in PHP, call commands, run queries, etc...?
> I'm not looking for all the answers, but tips on How to Get Started.
This isn't difficult (but isn't simple too!), try compile PHP using
--with-ibm-db2, and then use the "odbc" comand set (odbc_connect, etc).
The implentation of DB2 in PHP uses the odbc calls (it isn't odbc, it uses
the native DB2 cli). I use it here on my university to access a DB2 AIX
box from my Linux Web Server.
Antonio.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows |
| WorldNet Internet Maringa - PR - Brasil | what evil lurks in the |
| E-Mail: shadow@wnet.com.br | Heart of Men!" |
| shadow@uem.br | !!! Linux User: 52392 !!! |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This e-mail message is 100% Microsoft free!
/"\
\ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
/ \