What SQL Server 2012 Means for PHP Developers

Last week, Microsoft held a virtual conference to announce the availability of SQL Server 2012. The conference included a number of events (speakers, videos, training activities, etc.) that focused on the new functionality available in this release. Now that most of the fanfare has died down a bit, I’d like to take a look at…


Why Pass Parameters by Reference in the SQLSRV Driver?

Last week at JumpIn Camp we spent quite a bit of time focusing on the SQL Server Driver for PHP. As developers worked to build SQL Server support into their applications, they had lots of questions about how both the SQLSRV and PDO_SQLSRV drivers work under the hood. One of the questions that came up…


PHP Drivers for SQL Server Released!

Today, the SQL Server Driver for PHP team released the production-ready 2.0 versions of the SQLSRV and PDO_SQLSRV drivers for SQL Server. You can… Read the official announcement on the SQL Server Driver for PHP team blog here: Microsoft Drivers for PHP for SQL Server 2.0 Released!  Download the drivers from the Microsoft Download Center here: Download…


How to Page Data with the SQL Server Drivers for PHP

[Author’s note: See this post for an alternative strategy for paging data: Paging Data with the SQL Server Drivers for PHP: Simplified.] Shortly after the 1.0 version of the SQL Server Driver for PHP was released, I posted on the team blog as about how to page data with the driver. In the v1.1 release…


Working Down the Stack: Enabling ODBC Tracing with the SQL Server Driver for PHP

A couple of weeks ago I ran into some problems when figuring out how to do backups and restores with the SQL Server Driver for PHP. The problem itself* isn’t the point of this post, but how the problem took me further down the stack is. The short story is that a query I was…


Store Images in the Database or File System?

I intended for this post to be about how to use the SQL Server Driver for PHP to get images in an out of SQL Server Express, but the truth is that it’s fairly easy…so easy that I eventually thought it wasn’t a very interesting topic. (Besides, this topic is covered in the driver documentation)….


MSSQL vs. SQLSRV: What’s the Difference? (Part 2)

In my last post, I promised a comparison of the APIs for the MSSQL and SQLSRV extensions of PHP, so here it is. I constructed the table below assuming some familiarity with the MSSQL extension. I’m aiming to provide a high-level comparison that you might use if you were considering moving to the SQLSRV extension,…


mssql vs. sqlsrv: What’s the Difference? (Part 1)

[Part 2 of this post is here.] The SQL Server Driver for PHP (also called the “sqlsrv” driver for it’s API prefix) has been available since July of 2008, but I still often see the “old” driver (the “mssql” driver) used to connect to SQL Server from PHP scripts. Many of the tutorials I come…