Connecting PHP applications to IBM DB2 Universal Database

PHP is a powerful and increasingly popular server-side scripting language for creating Web content. After a brief overview of the features of PHP and an introduction to PHP scripting, the article describes how to compile PHP as a dynamically-loaded Apache module with DB2 support. The article concludes with several examples that demonstrate how to connect to, insert data into, and select data from a database using PHP.

Share:

Dan Scott (dan.scott@ca.ibm.com), Product Manager, IBM DB2 Universal Database for Linux, IBM Canada

Author photoDan Scott has worked in the application development area with IBM DB2 Universal Database since 1998. He has written articles, contributed to books, and presented at conferences on the subject of using PHP and other scripting languages with IBM databases. Dan enjoys motorcycles, mountain bikes, music, speculative fiction, and the smell of freshly ground coffee. He currently lives in Toronto with his wife and cat.



03 July 2001

Please note that an updated article covering DB2 Version 8.2, Apache 2, PHP 5, and Linux distributions with the 2.6 kernel is available at http://www.ibm.com/developerworks/db2/library/techarticle/dm-0502scott/.

Abstract

This article describes how to combine PHP with IBM DB2® Universal DatabaseTM to create Web applications. After a brief overview of the features of PHP, we discuss how to compile PHP as a dynamically loaded Apache module with DB2 support, and finish by presenting several examples of PHP database applications.


Introducing PHP: Hypertext Processor

PHP: Hypertext Processor (PHP) is a powerful and increasingly popular server-side scripting language for creating Web content. Portability is one of the primary reasons for PHP's popularity:

  • PHP defines a set of database APIs -- the unified ODBC functions -- that provide a layer of abstraction when you access an underlying database but use the native methods of the database server to maximize performance.
  • You can compile and run PHP on Microsoft Windows, Linux, BSD, Macintosh OS X, and UNIX® servers.
  • PHP can be tightly integrated with most popular Web servers, including Apache and Microsoft IIS, or it can be used as a standalone CGI interpreter.
  • The source code for PHP is freely available, and you are free to write and distribute PHP applications for both commercial and non-commercial use.

PHP's Unified ODBC functions are particularly attractive to application developers. Using this database abstraction layer simplifies porting an existing PHP application to a DB2 Universal Database from another database server by reducing it to a single step: changing the database connection string.

PHP also offers a number of well-defined APIs for features such as XML transforms and on-the-fly generation of images and Adobe Portable Document Format (PDF) files.

After a brief introduction to PHP scripting, this article describes how to compile PHP as a dynamically loaded Apache module with DB2 support. The article concludes with several examples that demonstrate how to connect to, insert data into, and select data from a database using PHP.


How PHP scripting works

PHP is primarily a server-side scripting language that enables you to embed application logic within HTML pages, or create entire HTML pages from PHP functions. When the Web server receives a request for a PHP page, control passes to the PHP engine. The PHP engine loads the PHP page, executes any PHP functions within the page, then returns the resulting HTML to the Web server.

To call a PHP function within a Web page, you simply embed the PHP functions within the normal HTML source. PHP functions are embedded in HTML-style tags that begin with ?php and end with ?. For example, demonstrates a call to the PHP function echo(). To include more than one function within the PHP tag, separate the functions by a semicolon (;) character.

Of course, you can include many PHP tags in a single PHP script. To demonstrate how easy it is to write Web applications using PHP, here's a short script that prints a sequence of numbers starting and ending at arbitrary values.

Example 1. Print sequence function: print.php

<html>
<head>
<title>Counting from x to y</title>
</head>
<body bgcolor="white">

<?php function print_sequence ($start, $stop, $increment) {
if ($start > $stop) {
return(FALSE);
}
elseif ($increment <= 0) {
return(FALSE);
}
else {
for ($i = $start; $i < $stop; $i = $i + $increment) {
print "$i ";
}
}
return(TRUE);
}
?>

<h1>Counting from x to y</h1>
<p>
Counting from 1 to 10 by 1: <?php print_sequence(1, 10, 1)?>
</p>
<p>
Counting from 2 to 20 by 2: <?php print_sequence(2, 20, 2)?>
</p>
</body>
</html>

Notice that in print.php we defined our own PHP function, called print_sequence(), in the <body> section of the HTML page. The function accepts three arguments, and performs some simple tests on the values to ensure that the function will not start an infinite loop. PHP provides control structures that should be familiar to programmers of most modern languages, although the syntax is most similar to Perl. Finally, the function returns a value that can be tested by the caller; by PHP convention, 0 indicates an error occurred, while any non-zero value indicates success.

In the <body> of the HTML page, we then call the print_sequence() function twice, using different arguments to test the function. Calling print.php from a PHP-enabled Web server results in the following output:

Counting from x to y

Counting from 1 to 10 by 1: 1 2 3 4 5 6 7 8 9

Counting from 2 to 20 by 2: 2 4 6 8 10 12 14 16 18

The preceding Example 1. Print sequence function: print.php demonstrated how to define a PHP function and call it in your PHP scripts. As with most other languages, you can call your custom PHP functions within other custom PHP functions. And, like other languages, you can collect these custom functions within libraries that you can include in your PHP scripts. These features let you quickly build custom libraries to support your particular development requirements.


Compiling and configuring PHP with DB2 Version 7 support

PHP is an open-source language that supports over a dozen different databases and many different Web servers. Many PHP developers start writing PHP applications on Linux servers that run the Apache Web server and connect to a back-end database like MySQL. If you are interested in scaling up to a database server like DB2, I will walk you through the steps required to compile PHP as an Apache dynamic module with DB2 Version 7 support on a Red Hat 6.2 system. I use Red Hat 6.2 because it is stable, mature, and well-tested. The requirements for other Linux distributions and UNIX operating systems may vary, but the basic steps remain the same.

With Red Hat 6.2, you can install Apache using the Red Hat Package Manager (RPM). These packages also install a precompiled version of PHP, but unfortunately it is an older version (PHP 3) that has been compiled without support for DB2. For simplicity's sake, I'll assume that you've already installed Apache with any associated developer RPMs. On my system, the relevant RPMs are as follows:

apache-devel-1.3.14-2.6.2.rpm

apache-1.3.14-2.6.2.rpm

apache-manual-1.3.14-2.6.2.rpm

One other prerequisite is the DB2 Application Development Client. You can download the DB2 Personal Developer's Edition, which includes the DB2 Application Development Client, free from the DB2 Web site.

Compiling PHP

  1. First, we need to download the source package for PHP. Point a browser to PHP's Web site and download a package called php-4.0.5.tar.gz.
  2. Next, we need to decompress the source package. The following command decompresses the contents of the source package into a directory called php-4.0.5:

    bash$ tar xzf php-4.0.5.tar.gz
  3. Use the cd command to make the newly created source directory your working directory.

    bash$ cd php-4.0.5
  4. Now we need to specify the configuration options for the PHP source. PHP relies on the autoconf toolset for most of the compile and configure options, so you can see a list of the possible options with the following command:

    bash$ ./configure --help

    For our purposes, we only need to specify three options for the configure:

    --with-apxs=apxs-path

    This option specifies the location of Apache's apxs tool, which allows you to build extension modules to add to Apache's functionality. On my machine, which apxs reveals that apxs is installed in /usr/sbin.

    --with-ibm-db2=instance-path

    This option specifies the location of the DB2 Application Development Client instance on your machine. When you install DB2 and create an instance, the default location is /home/db2inst1, and all of the DB2 libraries and header files are located in /home/db2inst1/sqllib. Your system may differ, but we'll use the default location.

    --sysconfdir=etc-path

    This option specifies where you want PHP to look for php.ini, the PHP configuration file. The default path is /usr/local/etc, but we will keep all of our configuration files together by specifying /etc.

    So to configure and make PHP, issue the following commands:

    bash$ ./configure --with-apxs=/usr/sbin/apxs \
    --with-ibm-db2=/home/db2inst1/sqllib --sysconfdir=/etc
  5. Once we have successfully configured the source files, we must compile PHP using the make command. This step may take a long time and produces a lot of output, so pipe the output into a log file and surf the Web while it runs:

    bash$ make > make.out
  6. Once PHP has compiled successfully, install PHP as the root user:

    bash$ su root
    Password:
    bash# make install
  7. Finally, ensure that /etc/ld.so.conf contains an entry with the path of the lipphp4.so shared library. If it doesn't contain /etc/httpd/modules, append the path to /etc/ld.so.conf. Then update the library linking cache with:

    bash# /sbin/ldconfig

Configuring Apache to use PHP 4.0

We are not ready to start running PHP scripts just yet, however. The PHP installation process does not get things right with a standard Red Hat 6.2 system, so that we have to edit the Apache configuration file, the Apache initialization script, and restart the Web server as follows:

  1. As part of the installation process, PHP automatically modifies Apache's configuration file, /etc/httpd/conf/httpd.conf, by inserting two lines that tell Apache how to dynamically load the PHP 4 extension modules. PHP's installer conveniently creates a backup of Apache's configuration file called /etc/httpd/conf/httpd.conf.bak, so that we can always revert to our previous configuration.

    PHP adds the following two lines to /etc/httpd/conf/httpd.conf:

    LoadModule php4_modulelib/apache/libphp4.so
    .
    .
    .
    AddModule mod_php4.c

    Notice that the first line added by PHP specifies a relative path. If you look elsewhere in the file, you'll see that other modules use the modules/ prefix, and if you check the contents of the /etc/httpd/modules directory, you'll see that libphp4.so has been installed. Before we can successfully restart Apache, we have to modify the LoadModule line to specify the correct location of the libphp4.so library as follows:

    LoadModule php4_modulemodules/libphp4.so

    The PHP installer attempts to append the lines at the end of the LoadModule and AddModule sections of the /etc/httpd/conf/httpd.conf file, but on Red Hat Linux 6.2, the installer places the lines in the wrong section. Open the configuration file in an editor, search for the section titled Dynamic Shared Object (DSO) Support, and move the lines containing php4 as shown in Example 2. Configuring PHP DSO support in httpd.conf.

    Example 2. Configuring PHP DSO support in httpd.conf

    # Dynamic Shared Object (DSO) Support
    # To use the functionality of a module built as a DSO, you
    # have to place corresponding `LoadModule' lines at this location so
    # the directives contained in it are actually available before they
    # are used. Please read the file README.DSO in the Apache 1.3
    # distribution for more details about the DSO mechanism and run
    # `httpd -l' for the list of already built-in (statically linked and
    # thus always available) modules in your httpd binary.
    #
    # Note: The order in which modules are loaded is important. Don't
    # change the order below without expert advice.
    #
    # Example:
    # LoadModule foo_module libexec/mod_foo.so
    .
    .
    .
    LoadModule php4_modulelibexec/libphp4.so
    
    # Reconstruction of the complete module list from all available
    # modules (static and shared) is necessary to achieve correct module
    # execution order. [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE,
    # UPDATE THIS TOO.]
    ClearModuleList
    
    AddModule...
    .
    .
    .
    AddModule mod_php4.c
  2. Ensure that the PHP file type is registered with Apache by confirming that the /etc/httpd/conf/httpd.conf file contains the following lines:
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
  3. To successfully use the DB2 function that we have compiled in our version of PHP, we have to set up the DB2 environment variables for Apache. The easiest way to do this is to source the /home/db2inst1/sqllib/db2profile script in the wrapper that starts Apache.

    If you installed Apache using RPM packages, Apache is started by a SysV init script called /etc/rc.d/init.d/httpd. We can ensure that Apache inherits the DB2 environment variables by adding the following line to the top of /etc/rc.d/init.d/httpd:

    . /home/db2inst1/sqllib/db2profile

    If you compiled Apache from source, you must instead modify the apachectl script to include the preceding line.

  4. We must restart Apache to use the configuration changes. If you installed Apache from RPM packages, restart Apache by issuing the following command as root:
    bash# /etc/rc.d/init.d/httpd restart

    If you compiled Apache from source, use the following command:

    bash# apachectl start

    If all has gone well, Apache will be ready to accept your PHP scripts with connections to DB2!


Writing PHP scripts that connect to DB2 Universal Database

To demonstrate some of the basic operations you can perform with PHP and DB2, we'll create a set of Web pages to help you manage a database table that contains data on a set of authors. First we will create a table to hold our author data, then write a PHP script that enables us to browse through existing authors. Finally, we will write a script that enables users to add their own author data to the table.

Creating the author table

The AUTHOR table contains four columns: LAST_NAME, FIRST_NAME, MIDDLE_INITIAL, and AUTHOR_ID, a unique identifier generated by DB2 that serves as the primary key of this table. The following Data Definition Language (DDL) statement creates this table:

Example 3. DDL for AUTHOR table

CREATE TABLE author (last_name VARCHAR(32) NOT NULL,
first_name VARCHAR(32) NOT NULL,
middle_initial VARCHAR(1),
author_id INTEGER GENERATED ALWAYS AS IDENTITY,
PRIMARY KEY (author_id));

To create this table, copy the DDL in Example 3. DDL for AUTHOR table into a file called tableddl.db2. Connect to the DB2 database and issue the DDL using the following commands:

bash$ db2 connect to SAMPLE
bash$ db2 -t -f tableddl.db2

Connecting to a database using PHP

To use this database, we need to insert some data into the table. We could issue some Data Manipulation Language (DML) statements, but because we have PHP installed, we will create and use a simple PHP form for inserting new records in the database. All of the following PHP scripts use the unified ODBC functions described in the PHP documentation.

Before we can insert data, we must create a database connection within a PHP script. Once we have confirmed that the connection is successful by returning a list of the tables with our user name, we can re-use that connection function within the rest of the scripts that we write.

Note: To connect to a DB2 database, the database must be cataloged in a DB2 client. This means that wherever you have installed PHP you must also install a DB2 client. To test your connection to the database from the command line, use the following command:

db2 connect to database user username using password

The syntax for connecting to a database using PHP is as follows:

int odbc_connect() (string dsn, string user, string password
[, int cursor_type]);

where:

dsnThe name of the database as registered in the DB2 catalog.

userThe name of the user that will connect to the database.

passwordThe password for user.

cursor_typeOptional arguments to specify cursor behavior.

So, to connect to our sample database SAMPLE with user name db2inst1 and password ibmdb2, we can use the following function in our scripts:

Example 4. Simple database connection function: db2lib.php

<?php function dbconnect($verbose) {
$dbname = "SAMPLE";
$username = "db2inst1";
$password = "ibmdb2";

// odbc_connect returns 0 if the connection attempt fails;
// otherwise it returns a connection ID used by other ODBC functions
$dbconn = odbc_connect($dbname, $username, $password);

if (($verbose == TRUE) && ($dbconn == 0)) {
echo("Connection to database failed.");
$sqlerror = odbc_errormsg($dbconn);
echo($sqlerror);
}

return($dbconn);
}
?>

If the script successfully connects to the database, it simply returns the database connection handle to the caller.

If the connection fails and you have asked for verbose output, the script tells you it failed to connect to the database and calls the odbc_errormsg() function to print the error message returned from the database.

We'll save the code in Example 4. Simple database connection function: db2lib.php in a file named db2lib.php so that we can include the function in the rest of our scripts.

Issuing INSERT statements

Once you have successfully connected to the database, you can start doing some more interesting work such as inserting, updating, and retrieving data. The following example inserts a new set of data into the tables for our sample application.

Note:

We define the SQL statement as a string variable for two reasons:

  1. Defining all of our SQL statements at the top of the file makes it easier to read the code and modify the ements to tweak our application. This is especially helpful for long SQL statements that include JOIN operations or complex WHERE clauses that might wrap over several lines.
  2. In many database applications we need to repeatedly issue the same statement, sometimes with slightly different values. Declaring the statement as a string variable when you develop your application makes it easier to convert to a production application.

Issuing static SQL statements

You can issue a simple SQL statement -- one that contains no parameter markers for variable input -- using the odbc_exec() function. The following script inserts new rows into the AUTHOR table:

Example 5. Static INSERT statement: db2insert.php

<html>
<head>
<title>INSERT data into AUTHOR table</title>
</head>
<body bgcolor="white">
<?php

// include the dbconnect() function
include_once("db2lib.php");

$author_insert = "INSERT INTO author" .
"(last_name, first_name, middle_initial)" .
"VALUES('Scott', 'Daniel', 'B')";

$verbose = TRUE;
$dbconn = dbconnect($verbose);

if ($dbconn != 0) {
// odbc_exec returns 0 if the statement fails; otherwise
// it returns a result set ID
$result = odbc_exec($dbconn, $author_insert);

if ($result == 0) {
echo("INSERT statement failed.");
$sqlerror = odbc_errormsg($dbconn);
echo($sqlerror);
}
else {
echo("Successfully inserted one row.");
}
}
?>

Issuing SQL statements with parameter markers

In the real world, of course, you probably wouldn't write a script to insert the same row into the database over and over again. You might write a script that provides HTML forms for you to ease your data entry tasks (or the data entry tasks of the users of your Web site). Fortunately, PHP makes handling HTML form input easy. When a PHP script is the target action of an HTML <form> element, any CGI parameters are automatically converted into local variables within the PHP script. The name of each local variable corresponds to the NAME attribute of the respective input field in the form.

If you want to reissue the same statement multiple times, the odbc_exec() function is an expensive approach because it prepares and executes the statement every time. You can improve the performance of your application by preparing the statement in a separate step with odbc_prepare() and executing that prepared statement by calling odbc_execute() multiple times.

In the following example, we create another PHP library and a script that displays an HTML form to help us insert data into the AUTHOR table. The library demonstrates how to prepare an INSERT statement that contains parameter markers using the odbc_prepare() function. We use PHP's powerful HTML form parsing to determine if the script was invoked with any CGI variable values; if not, we simply return the HTML form. If the script was invoked with CGI variable values, we parse the contents of the form fields and pass the arguments as an array to the odbc_execute() function to insert the data into the table.

Example 6. Dynamic INSERT using odbc_prepare and form submission library: db2form.php

<?php function insert_data( $dbconn, $last_name, $first_name, $middle_initial) {
$insert_stmt = "INSERT INTO author " .
"(last_name, first_name, middle_initial) VALUES(?, ?, ?)";

// odbc_exec returns 0 if the statement fails; otherwise
// it returns a result set ID
$result = odbc_prepare($dbconn, $insert_stmt);

if ($result == 0) {
echo("odbc_prepare() failed.");
return(FALSE);
}
else {
// build array of parameter values for INSERT statement
$param_array["last_name"] = $last_name;
$param_array["first_name"] = $first_name;
$param_array["middle_initial"] = $middle_initial;

echo("Inserted $last_name and $first_name and $middle_initial");

odbc_execute($result, $param_array);
}
return(TRUE);
}
?>

<?php function author_form($action) {
// $form is a HERE string that spans multiple lines
$form = <<<HERE
<pre>
<form action="$action" method="post">
Last name: <input type="text" name="last_name" size="32" maxlength="32">
First name:<input type="text" name="first_name" size="32" maxlength="32">
Initial:<input type="text" name="middle_initial" size="1" maxlength="1">
<input type="submit" value="Insert data">
</form>
</pre>
HERE;

return($form);
}
?>

db2form.php is our second PHP library, containing the insert_data() and author_form() functions. Placing these functions in a library enables us to re-use them in other scripts. The following script, prepinsert.php, performs exactly that role; it includes db2lib.php to make use of the standard database connection function, and db2form.php for the standard INSERT and form submission functions. The script returns a Web page with a simple form that lets us insert new rows in our database, and is really nothing more than a wrapper that calls our library functions.

Example 7. Dynamic INSERT and form submission script: prepinsert.php

<html>
<head>
<title>INSERT using odbc_prepare()</title>
</head>
<body bgcolor="white">
<!-- The form within this PHP script calls itself as
the action-handler using the $PHP_SELF constant.
If the script is called without CGI parameter values,
only the form is displayed on the page.
If the script is called with CGI parameter values,
we also call the custom function insert_data(). -->

<?php
// include our custom function libraries
include_once("db2lib.php");
include_once("db2form.php");
?>

&lt?php
if (($last_name == "") || ($first_name == "")) {
// we received no parameter values; just print the form
}
else {
$verbose = TRUE;
$dbconn = dbconnect($verbose);

if ($dbconn == 0) {
return(FALSE);
}
else {
insert_data($dbconn, $last_name, $first_name, $middle_initial);
}
}

// $PHP_SELF is a constant that contains the name of this script
echo(author_form($PHP_SELF));
?>
</body>
</html>

SELECT statements and result sets

SELECT statements often return multiple rows of data. When you call the odbc_exec() function for a SELECT statement, the function returns a result set identifier. A result set is an array consisting of 0 or more rows that match a database query; a result set identifier is simply a value that you pass to other functions to work with the rows in the result set.

Once we retrieve our result set identifier, we can display the contents of the result set using a convenient PHP function called odbc_result_all(). This function prints the entire result set as an HTML table.

Example 8. Simple SELECT statement: db2select.php

<html>
<head>
<title>Simple SELECT statement</title>
</head>
<body bgcolor="white">

<?php
// include our custom function libraries
include_once("db2lib.php");
include_once("db2form.php");
?>

<?php function display_authors($dbconn) {
// select all rows from the AUTHOR table
$select_stmt = "SELECT last_name, first_name, middle_initial, author_id " .
"FROM author ";

if ($dbconn != 0) {
// odbc_exec returns 0 if the statement fails;
// otherwise it returns a result set ID
$result = odbc_exec($dbconn, $select_stmt);

if ($result == 0) {
echo("SELECT statement failed.");
$sqlerror = odbc_errormsg($dbconn);
echo($sqlerror);
}
else {
// odbc_result_all prints all of the rows
// for a result set ID as an HTML table
odbc_result_all($result);
}
}
}
?>

<?php
$verbose = TRUE;
$dbconn = dbconnect($verbose);

if (($last_name == "") || ($first_name == "")) {
// we received no parameter values; just print the form
}
else {
insert_data($dbconn, $last_name, $first_name, $middle_initial);
}
echo(author_form($PHP_SELF));
 
display_authors($dbconn);
?>
</body>
</html>

db2select.php simply extends prepinsert.php by adding a new function called display_authors(). The function displays a list of all authors in the AUTHOR table, but we continue to display the submission form and insert new authors when the Submit button is pressed. The script should generate an HTML page with output similar to the following, depending on the records that you insert into the table:

Last name: __________
First name: _________
Initial: _

Submit

LAST_NAME FIRST_NAME MIDDLE_INITIAL AUTHOR_ID
ScottDanielB1
FinnHuck2
BagginsBilboH3

Conclusion (which is really just the beginning)

This article introduced the PHP scripting language, described how to compile and configure PHP with support for DB2 Universal Database, and demonstrated how to perform basic database operations with PHP, such as creating connections, modifying data, and retrieving data using CGI forms. However, this is just the beginning of what you can do when you combine PHP with DB2.

While PHP can act as a flexible, extensible server-side language for manipulating database information, it also includes sophisticated interfaces for presenting your data, including XML support with Extensible Stylesheet Language Transformation (XSLT), a Web search engine, the ability to dynamically generate multimedia output such as Macromedia Shockwave Flash animations, Adobe Portable Document Format (PDF) files, and images. Following is a list of Web sites that provide further information and example applications.

Resources

  • PHP.net is the official home of PHP development and documention. Download the PHP source, browse the PHP Manual, join one or more of the many specialized PHP mailing lists, and report bugs here.
  • A second home for those who live and breathe PHP, phpbuilder.net offers an abundance of articles, hosts a number of Web-based forums, and includes a code library with plenty of example scripts to speed your development efforts.
  • The official home of IBM DB2 Universal Database offers a free copy of DB2 Personal Developer's Edition to get you started.
  • For general DB2 assistance, check out DB2 Universal Database Online Support where you can view or download the DB2 manuals in HTML or PDF in 24 different languages. You might find the DB2 SQL Getting Started and the DB2 SQL Reference especially valuable resources while you craft complex SQL statements in your PHP scripts.
  • A rich source of knowledge and support by and for DB2 users, International DB2 User's Group (IDUG) hosts conferences and maintains a Web site with online discussion groups and an extensive set of related resources.

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Information management on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management
ArticleID=14001
ArticleTitle=Connecting PHP applications to IBM DB2 Universal Database
publish-date=07032001