Contents tagged with PDO
-
Version 3.0 (beta) of the SQL Server Drivers for PHP Released!
A Community Technology Preview (a beta release) of v3.0 of the SQL Server Drivers for PHP was released today (see the announcement on the team blog). You can download it here: Download v3.0 of the SQL Server Drivers for PHP. In this release, there are three new features: buffered queries, support for LocalDB, and support for high availability and disaster recovery. It’s important to note that the latter two features are dependent on the next version of SQL Server (code named “Denali”). A preview of Denali can be downloaded for free here (see notes later in this article about the installation process): Download SQL Server Denali CTP 3. More detail about each new feature is in the sections below. We’re hoping to get feedback from you. If you have feedback, please comment on this post or reach out to me (@brian_swan) and/or Jonathan Guerin (@kop48, the Program Manager for the drivers) on Twitter.
-
Using PDO::quote with Parameterized Queries
I spent some time last week investigating a puzzling issue raised in the SQL Server Driver for PHP forums: Need help with PDO::quote() and PDOStatement::bindValue and PDO::execute using new SQLSRVR 2.0 driver. At the heart of the issue was this question: Should you use the PDO::quote method to quote a parameter if you are also using the PDOStatement::bindValue or the PDOStatement::bindParam method to bind the parameter? My answer is no, you shouldn’t. I’ll explain why not, but I wonder if I’m potentially missing some use cases where it does make sense…I’d be very interested to learn those cases if I am.
-
Using the Zend Framework and the PDO_SQLSRV Driver
A couple of months ago, Rob Allen pointed out in a blog post that no Zend Framework PDO adapter existed for SQL Server. But, he also noted that it would be easy to write one…so he did: https://github.com/akrabat/Akrabat/blob/master/zf1/Akrabat/Db/Adapter/Pdo/Sqlsrv.php. Rob also mentioned that it would be very easy to use his adapter with the Zend Framework, but I wondered just how easy – that’s what I’ll investigate in this post. (Cut to the chase: it is very easy.)
-
Update Release of the PHP Drivers for SQL Server
An update release to the Microsoft Drivers for SQL Server for PHP 2.0 is now available. You can download it here and you can read what Ashay Chaudhary (Program Manager for the drivers) had to say about the release here. The release contains fixes for 4 bugs:
-
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…
-
How to Page Data with the SQL Server Drivers for PHP
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 of the driver, the team added some functionality that made paging data easier and more intuitive, but I never got around to a blog post that showed how to use the new functionality. So, with the final release of the 2.0 version of the driver coming soon, I thought it was high time I posted something about using the functionality that was added in the v1.1 driver (better late then never!). While I’m at it, I’ll include code that shows how to do paging with the PDO driver. (Complete scripts attached to this post.)