Databases Reference
In-Depth Information
Now, our request for http://localhost/redbook/toc should echo the text TOC
of this topic follows . Notice there is another function, __call(), to
handle undefined actions such as redbook/appendix.
You can see that the controller/action mechanism allows you to have friendly
URIs for your Web application and also allows you to organize them properly.
This completes our basic test of mod_rewrite and the framework setup. We
discuss other controller objects in detail when we build our sample application
but for now we move on with the Eclipse environment setup.
3.2 DB2 Interface with PHP
There are three main extensions of PHP that you can use to develop applications
with DB2:
ibm_db2
PDO_ODBC
Unified ODBC
IBM recommends using ibm_db2 or PDO _ODBC to get best results out of DB2
database.
I BM_DB2
ibm_db2 extension of PHP provides an interface to connect from PHP to IBM
DB2 database. ibm_db2 provides a mechanism to connect to both cataloged and
non-cataloged databases. This extension provides mechanisms for application
developers to issue SQL queries, work with large objects, call stored procedures,
use persistent connections, and use prepared SQL statements. It also works on
PHP releases below Version 5. Unlike PDO_ODBC, ibm_db2 is based on
traditional procedural programming and performs better compared to Unified
ODBC functions. ibm_db2 provides built-in functions for getting details about the
DB2 database server and client by querying system catalog tables, which
provide lots of information about the DB2 database management system. The
latest ibm_db2 extension for PHP has been enhanced to support the new XML
data type in DB2 V9. We highly recommend that you download the latest
ibm_db2 extension from the following Web site:
http://www.pecl.php.net/package/ibm_db2
You can download the library(dll) for Windows from the following Web site:
http://pecl4win.php.net/ext.php/php_ibm_db2.dll
 
Search WWH ::




Custom Search