Andrew Hill wrote:
> ARcadius,
> You may use an abstraction library such as PEARDB or ADODB, or
> simply the unified ODBC functions.

Andrew, you always suggest ODBC as a good solution for portable database
application development, but AFAIK it is not a good solution at all
because for crucial things you still have to resort to database specific
code to handle database differences.

I already asked you this before but I don't recall ever getting a
satisfactory answer. I don't know if the problem is in PHP ODBC API or
is really an ODBC limitation, but for instance, when you want to
implement auto-incremented sequences of integer values that are
fundamental for database aplications to use in primary key fields, with
ODBC you there seems to be no database independent way to create and
retrieve the next sequence value.

The other important issue, especially for Web development, is query
results paging. In most current databases there some clause like for
instance MySQL LIMIT. Others use different syntaxes or clause for
restricting the range of rows that are returned by the server to the
client. This is importa, especially when you want to show a small number
of rows of a very large result set.

Once you suggested to use ODBC cursors, but that is not the same as
limiting the result rows in the actual queries. For instance, if you
need to get the first from row 10 to 19 of a result set of 1.000.000
rows, using the LIMIT clause will make the server stop the query after
20 rows. Using cursors, AFAIK will not stop the query making the
database server hog the machine needlessly to traverse 1.000.000 rows of
data that an application is not interested in.

I don't know if there are better and portable solutions using PHP ODBC
API functions, but with your ODBC knowledge is there a way to solve
these issues with a complete ODBC API (besides what PHP ODBC API can

I would like to make a better ODBC driver class for Metabase so users
can develop portable database applications using Metabase via ODBC, but
it seems that I will have to develop subclasses for each type of ODBC
data source (MS Access, IBM DB2, SAP-DB, etc...) to handle database
specific issues that the ODBC API does not handle by itself.

Manuel Lemos

Manuel Lemos

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to