Re: IBM DB/2 + PHP4
| From: | Rasmus Lerdorf | Date: | Wed, 19 Jul 2000 18:35:44 +0000 |
| Subject: | Re: IBM DB/2 + PHP4 | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1300@lists.php.net to get a copy of this message | ||
> I have a similar question, so even if you don't have an ODBC driver on your
> box (I'm in linux) you can still use the odbc functions to talk to a db2
> database if you supply the config paramater? just making sure, it seems
> kinda hackish, you might want to document this somewhere :P
DB2 is one of several databases covered by the Unified-ODBC code in
PHP. Unified-ODBC confuses a lot of people. In as simple a way as I can
put it:
Some databases use a native API modelled after the CLI (Call
Level Interface) specification. We found that we had 5 or 6 different
PHP database modules that were mostly identical because the native API
calls were the same for the various databases. Instead of trying to
maintain the same code in 6 different files, we combined it into a single
unified file. When you build PHP using --with-ibm-db2 you tell PHP to use
the unified odbc driver file in its DB2 mode. At the PHP user-level you
use the ODBC function calls. This doesn't mean you are using the ODBC
wire protocol. Behind the scenes these PHP calls go directly to the
linked in native CLI library provided with DB2. So, even though you are
typing odbc_connect(), there is actually no ODBC going on here.
-Rasmus