[UPHPU] great project meeting last night

Jared Smith jared.jsmith at gmail.com
Sat Jun 11 20:09:56 MDT 2005


> That might be tough throwing MS SQL Server in the mix.  I'm using
> PEAR::DB, but have never looked at ADODB.  While the SQL syntax between
> Postgres, SQLite and MySQL is almost entirely interchangable, mssql uses
> Transact-SQL which might throw some weird errors your way.
> 
> For instance, you don't do SELECT * FROM table LIMIT 5;  You'd have to
> use SELECT TOP 5 * FROM table;  And sql server has no OFFSET either.

I'll add my two cents here, since it's a hot-button topic for me.  Any
database abstraction layer worth its weight in code should *abstract*
any of these differences away.  In other words, you should tell the
db-abstraction layer that you'd like to limit your query to the first
5 entries, and not have to put that in the SQL code.

There's almost nothing worse (when it comes to db-abstraction layers)
than using non-portable SQL inside an abstraction layer -- you're
bypassing the very thing the abstraction layer was designed to help
with!

-Jared Smith




More information about the UPHPU mailing list