views:

110

answers:

1

I have been looking around the current options (and related SO questions) regarding PHP ORM solutions, however I have a couple of unique requirements:

  • I am running PHP on Windows Server 2003
  • I need to interface with SQL Server 2005

I can't seem to find a simple answer from the PHP ORM solutions out there as to which (if any) support MSSQL as an adaptor option. Outlet seems to support this, for instance, but is only mentioned in passing on the documentation page, while other references say that the current version (1.0) has only been tested with MySQL.

At the moment, I am using the Microsoft PHP SQL Server driver, which as I understand it, can't be used with current ORM solutions until the driver itself supports PDO (which the team are looking into, but with no timeframe).

So what can I use today as an ORM solution on PHP for Windows that interfaces with SQL Server. Anything out there at all?

+1  A: 

From Doctrine manual:

The currently supported PDO database drivers are:

fbsql   FrontBase
ibase   InterBase / Firebird (requires PHP 5)
mssql   Microsoft SQL Server (NOT for Sybase. Compile PHP --with-mssql)
mysql   MySQL
mysqli  MySQL (supports new authentication protocol) (requires PHP 5)
oci     Oracle 7/8/9/10
pgsql   PostgreSQL
querysim    QuerySim
sqlite  SQLite 2

And PHP on Windows should ship with an appropriate extension for MSSQL for PDO. Just enable

extension=php_pdo.dll
extension=php_pdo_mssql.dll

Propel should also support MSSQL, as it is written on top of PDO. And while not a full fledged ORM as such, Zend_Db has an adapter for MSSQL as well. The latter uses pdo-dblib though.

Gordon
Thank-you, a very concise answer. Doctrine looks a little heavy for my liking, but I will definitely read up on Propel.
Will Croft