PHP3 vs. ODBiC
| From: | donny Hsu | Date: | Mon, 18 Oct 1999 19:35:49 +0000 |
| Subject: | PHP3 vs. ODBiC | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11749@lists.php.net to get a copy of this message | ||
I'm experimenting with both ODBiC on WinNT (http://www.odbic.com) and with PHP3.
I like ODBiC because its "interface to databases is provided by connecting
to any ODBC driver. ODBC uses SQL statements to SELECT, INSERT, UPDATE or
DELETE the data."
If I wanted to query everything from the Products table in an Access file,
I'd embed:
<!--DATATBASE DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=products.mdb; FIL=MS Access-->
<!--SQL SELECT * FROM Products -->
in .html.
If I convert the MS Access database to Oracle, I change the DATABASE DRIVER
statement. The SQL statement stays the same.
--------------------
Unfortunately ODBiC is not fully cross-platform (ie. Windows only). Which
is why I've been considering PHP3.
However, with PHP, I've noticed an open, close, query, etc. function for
each separate database.
From my understand that means I'd use odbc_ functions when querying an
Access database, and use ora_ functions when querying Oracle.
Replacing odbc_ to ora_ functions when converting databases could be a
pain. Can this be avoided?
Can I use SQL statements to SELECT, INSERT, etc. regardless of the database
(like with ODBiC)?
donny Hsu
dhsu@semantix.com