{"id":4953,"date":"2010-08-05T08:35:00","date_gmt":"2010-08-05T15:35:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/dataplatforminsider\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/"},"modified":"2024-01-22T22:50:11","modified_gmt":"2024-01-23T06:50:11","slug":"microsoft-drivers-for-php-for-sql-server-2-0-released","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/","title":{"rendered":"Microsoft Drivers for PHP for SQL Server 2.0 released!!"},"content":{"rendered":"<p><span style=\"font-size: x-small\"><span style=\"font-size: small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\">Microsoft\u00a0is announcing an important interoperability milestone: the release of the Microsoft Drivers for PHP for SQL Server 2.0!!<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">The major h<\/span>ighlight of this release is the addition of the PDO_SQLSRV driver, which adds support for PHP Data Objects (PDO). The PHP community has signaled that PDO is the future as it removes data access complexity in PHP applications by enabling developers to focus their efforts on the applications themselves rather than database-specific code. Providing the PDO_SQLSRV driver enables popular PHP applications to use the PDO data access \u201cstyle\u201d to interoperate with Microsoft\u2019s SQL Server database and make it easier for PHP developers to take advantage of SQL Server&#8217;s proven track record and to leverage features such as <\/span><\/span><a href=\"http:\/\/blogs.msdn.com\/b\/interoperability\/archive\/2010\/04\/08\/sql-server-reporting-services-sdk-for-php-adding-business-intelligence-and-reporting-features-to-php-applications.aspx\"><span style=\"font-size: small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\">SQL Server&#8217;s Reporting Services and Business Intelligence<\/span><\/span><\/a><span style=\"font-size: small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"> capabilities. In addition to accessing SQL Server, both drivers (SQLSRV and PDO_SQLSRV) also enable PHP developers to easily connect to and use Microsoft&#8217;s cloud database offering, <\/span><\/span><a href=\"http:\/\/www.microsoft.com\/windowsazure\/sqlazure\/\"><span style=\"font-size: small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\">SQL Azure<\/span><\/span><\/a><span style=\"font-size: small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\">, and enjoy the benefits of a reliable and scalable relational database in the cloud, as well as functionality <\/span><\/span><a href=\"http:\/\/www.odata.org\/producers\"><span style=\"font-size: small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\">like exposing OData feeds<\/span><\/span><\/a><span style=\"font-size: small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\">.<\/span><\/span><\/p>\n<p><b><span style=\"font-size: small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\">New architecture<\/span><\/span><\/b><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\">While the major focus of this release was the PDO_SQLSRV driver, we took this opportunity to re-architect our code create a core functional layer so that we can offer the same functionality and consistency in both drivers (SQLSRV and PDO_SQLSRV). This new architecture enables us to add new features easily to both drivers.<\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><img loading=\"lazy\" decoding=\"async\" class=\"wlDisabledImage\" style=\"border: 0px\" title=\"image\" src=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2018\/03\/3527.image_thumb_23E1968D.png\" alt=\"image\" width=\"526\" height=\"277\" border=\"0\" \/><\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">PHP d<\/span>evelopers a<\/span>re<\/span> now free to select the driver of their choice, using either the native SQLSRV API (SQLSRV driver) or the PDO API (PDO_SQLSRV driver) for accessing SQL Server or SQL Azure. The following code snippets provide an illustration of a simple task (query and list products from AdventureWorks sample database) using each driver:<\/span><\/span><\/span><\/p>\n<p><b><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">SQLSRV driver:<\/span><\/span><\/span><\/b><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">&lt;?php<br \/>\n<\/span><\/span><\/span><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">$serverName = &#8220;(local)\\sqlexpress&#8221;;<br \/>\n$connectionOptions = array( &#8220;Database&#8221;=&gt;&#8221;AdventureWorks&#8221; );<\/span><\/span><\/p>\n<p><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">\u00a0\u00a0 \/* Connect to SQL Server using Windows Authentication. *\/<br \/>\n$conn = sqlsrv_connect( $serverName, $connectionOptions );<\/span><\/span><\/p>\n<p><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">\u00a0\u00a0 \/* Get products by querying against the product name.*\/<br \/>\n$tsql = &#8220;SELECT ProductID, Name, Color, Size, ListPrice FROM Production.Product&#8221;;<\/span><\/span><\/p>\n<p><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">\u00a0\u00a0 \/* Execute the query. *\/<br \/>\n$getProducts = sqlsrv_query( $conn, $tsql );<\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">\u00a0\u00a0 \/* Loop thru recordset and display each record. *\/<br \/>\n<\/span><\/span><\/span><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">while( $row = sqlsrv_fetch_array( $getProducts, SQLSRV_FETCH_ASSOC ) )<br \/>\n<\/span><\/span><\/span><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">{<br \/>\n<\/span><\/span><\/span><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">print_r( $row );<br \/>\n}<\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">\u00a0\u00a0 \/* Free the statement and connection resources. *\/<br \/>\n<\/span><\/span><\/span><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">sqlsrv_free_stmt( $getProducts );<br \/>\n<\/span><\/span><\/span><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">sqlsrv_close( $conn );<br \/>\n?&gt;<\/span><\/span><\/p>\n<p><b><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">PDO_SQLSRV driver:<\/span><\/span><\/span><\/b><\/p>\n<p><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">&lt;?php<br \/>\n$serverName = &#8220;(local)\\sqlexpress&#8221;;<\/span><\/span><\/p>\n<p><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">\u00a0\u00a0 \/* Connect to SQL Server using Windows Authentication. *\/<br \/>\n$conn = new PDO( &#8220;sqlsrv:server=$serverName; Database=AdventureWorks&#8221; ); <\/span><\/span><\/p>\n<p><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">\u00a0\u00a0 \/* Get products by querying against the product name.*\/<br \/>\n$tsql = &#8220;SELECT ProductID, Name, Color, Size, ListPrice FROM Production.Product&#8221;;<\/span><\/span><\/p>\n<p><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">\u00a0\u00a0 \/* Execute the query. *\/<br \/>\n$getProducts = $conn-&gt;query( $tsql );<\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">\u00a0\u00a0 \/* Loop thru recordset and display each record. *\/<br \/>\n<\/span><\/span><\/span><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">while( $row = $getProducts-&gt;fetch( PDO::FETCH_ASSOC ) )<br \/>\n<\/span><\/span><\/span><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">{<br \/>\n<\/span><\/span><\/span><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">print_r( $row );<br \/>\n}<\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">\u00a0\u00a0 \/* Free the statement and connection resources. *\/<br \/>\n<\/span><\/span><\/span><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">\u00a0\u00a0 $getProducts = NULL;<br \/>\n<\/span><\/span><\/span><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">$conn = NULL;<br \/>\n?&gt;<\/span><\/span><\/p>\n<p><b><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">Community Engagement<\/span><\/span><\/span><\/b><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">We\u2019d like to think our engagement with the PHP community has been among our best and has helped achieve this high level of interoperability with Microsoft\u2019s SQL Server. We listened to comments from the PHP community including core contributors to PHP, many core contributors from several popular PHP applications (such as Drupal, Doctrine, xPDO), several software vendors, and individual developers. We worked hard to meet the intent of PDO (simplifying data access) in our design for PDO_SQLSRV. We worked through several challenges some of which are outlined in a <\/span><\/span><\/span><a href=\"http:\/\/blogs.msdn.com\/b\/brian_swan\/archive\/2010\/04\/27\/design-decisions-in-the-pdo-driver-for-sql-server.aspx\"><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">blog<\/span><\/span><\/span><\/a><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\"> by my colleague, Brian Swan. Once again, we heard from our partners and community with the primary goal of delivering a driver that best meets interoperability needs of PHP developers. The team received and responded to many comments in our blog, online forum, at conferences and other events, from participants on the CodePlex project site, through conference calls, and even twitter. We\u2019d like to thank everyone for their effort and look forward to continued community engagement.<\/span><\/span><\/span><\/p>\n<p><b><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">Functionality highlights<\/span><\/span><\/span><\/b><\/p>\n<p><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">1. A fully functional PDO_SQLSRV driver &#8211; all API defined by PDO are implemented, even those marked EXPERIMENTAL by PDO. For clarity, all custom attributes or constants in PDO_SQLSRV start with &#8220;PDO::SQLSRV_&#8221;. <\/span><\/span><\/p>\n<p>2. The SQLSRV driver rebuilt with the re-architected code, and several critical bug fixes.<\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">3. The Connection Options are almost identical for both drivers (exceptions only when the option did not apply to PDO_SQLSRV). However, the Connection Options need to be specified in the connection string of PDO_SQLSRV.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">4. All errors are now encoded per the setting of the CharacterSet connection option in SQLSRV, and the setting of the PDO::SQLSRV_ATTR_ENCODING attribute in PDO_SQLSRV.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">5. PDO does not define an OBJECT data type, so all DATETIMEs from SQL Server are always returned as strings by PDO_SQLSRV. The default for SQLSRV continues to be PHP&#8217;s DateTime object and can be modified using the ReturnDatesAsStrings in the Connection Options array.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">6. The custom attribute PDO::SQLSRV_ATTR_DIRECT_QUERY offers many benefits and additional flexibility for developers:<\/span><\/span><\/span><\/p>\n<blockquote><p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">a. It enables a more performant use of the PDO::query() API<br \/>\n<\/span><\/span><\/span><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">b. It enables the use of SQL Server&#8217;s temporary tables feature by multiple queries<br \/>\nc. It offers the ability to bind parameters not traditionally offered by PDO::query()<\/span><\/span><\/p><\/blockquote>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">7. In PDO_SQLSRV, a developer has the additional flexibility to encode data at per connection, and per column.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">8. PDO offers the ability to define IN and IN_OUT parameters, in addition PDO_SQLSRV offers the capability to define OUT parameters very easily.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">9. Developers can set the query timeout using the PDO::SQLSRV_ATTR_QUERY_TIMEOUT per connection and per statement, and exploit it to provide a better user experience in their applications.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">10. Both drivers, SQLSRV &amp; PDO_SQLSRV, require SQL Server Native Access Client 2008 R2 which offers an improved experience when connecting to SQL Azure as well as SQL Server 2005 and later.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">11. The example application for SQLSRV updated to demonstrate new features in our SQLSRV driver in our v1.1 release, and the same application is also ported to demonstrate the same functionality using PDO_SQLSRV.<\/span><\/span><\/span><\/p>\n<p><b><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">Documentation and download<\/span><\/span><\/span><\/b><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">The Microsoft Drivers for PHP for SQL Server 2.0 release is available for download on the <\/span><\/span><\/span><a href=\"http:\/\/www.microsoft.com\/downloads\/details.aspx?displaylang=en&amp;FamilyID=80e44913-24b4-4113-8807-caae6cf2ca05\"><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">MSDN Download Center<\/span><\/span><\/span><\/a><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\"> as well as the <\/span><\/span><\/span><a href=\"http:\/\/www.microsoft.com\/web\/gallery\/install.aspx?appid=SQLDriverPHP\"><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">Web Platform Installer<\/span><\/span><\/span><\/a><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">. We encourage you to download it and explore the programming guides, the API documentation, and the two example applications in the .chm file. We will continue to offer our v1.1 release along with our new v2.0 release on our MSDN Download Center for a few months. There is also the ability to access <\/span><\/span><\/span><a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ee229551(v=SQL.10).aspx\"><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">all documentation on MSDN<\/span><\/span><\/span><\/a><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">, including the example applications.<\/span><\/span><\/span><\/p>\n<p><b><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">Open source code<\/span><\/span><\/span><\/b><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">We have published the source code for both drivers on our <\/span><\/span><\/span><a href=\"https:\/\/techcommunity.microsoft.com\/t5\/sql-server-integration-services\/sql-server-on-codeplex\/ba-p\/387333\"><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">CodePlex project site<\/span><\/span><\/span><\/a><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">. At this time we are <span style=\"text-decoration: underline\">releasing the source code under the Apache 2.0 license<\/span>. Microsoft supports only the Microsoft signed versions of the drivers.<\/span><\/span><\/span><\/p>\n<p><b><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">Feedback and bug reports<\/span><\/span><\/span><\/b><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">We thank community members for their comments. We will continue to be responsive to feedback on this blog, our <\/span><\/span><\/span><a href=\"http:\/\/social.msdn.microsoft.com\/Forums\/en-US\/sqldriverforphp\/threads\"><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">MSDN forum<\/span><\/span><\/span><\/a><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">, as well as the established <\/span><\/span><\/span><a href=\"http:\/\/connect.microsoft.com\/SQLServer\/Feedback\"><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">SQL Server product feedback<\/span><\/span><\/span><\/a><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\"> mechanism. In addition to reporting problems on our forum, the forum is a great resource for looking up issues reported by others and finding the solution that worked. Please send feedback our way as we continue our interoperability work to give developers choices when it comes to our platform.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">Thanks.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">Ashay Chaudhary<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: x-small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\"><span style=\"font-size: small\">Program Manager, SQL Connectivity &#8211; PHP<\/span><\/span><\/span><\/p>\n<div id=\"scid:0767317B-992E-4b12-91E0-4F059A8CECA8:f3481100-0707-4863-9385-ee4077a0a072\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px;float: none;padding: 0px\"><span style=\"font-size: small\"><span style=\"font-family: tahoma,arial,helvetica,sans-serif\">T<\/span>ec<\/span>hnorati Tags: <a href=\"http:\/\/technorati.com\/tags\/SQL+Server\" rel=\"tag\">SQL Server<\/a>,<a href=\"http:\/\/technorati.com\/tags\/PHP\" rel=\"tag\">PHP<\/a>,<a href=\"http:\/\/technorati.com\/tags\/Micosoft\" rel=\"tag\">Micosoft<\/a>,<a href=\"http:\/\/technorati.com\/tags\/SQL+Server+2.0\" rel=\"tag\">SQL Server 2.0<\/a>,<a href=\"http:\/\/technorati.com\/tags\/PDO\" rel=\"tag\">PDO<\/a>,<a href=\"http:\/\/technorati.com\/tags\/Interoperability\" rel=\"tag\">Interoperability<\/a>,<a href=\"http:\/\/technorati.com\/tags\/SQL+Azure\" rel=\"tag\">SQL Azure<\/a>,<a href=\"http:\/\/technorati.com\/tags\/PHP+Data+Objects\" rel=\"tag\">PHP Data Objects<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft\u00a0is announcing an important interoperability milestone: the release of the Microsoft Drivers for PHP for SQL Server 2.0!! The major highlight of this release is the addition of the PDO_SQLSRV driver, which adds support for PHP Data Objects (PDO).<\/p>\n","protected":false},"author":1457,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","footnotes":""},"post_tag":[],"product":[],"content-type":[2448],"topic":[],"coauthors":[2487],"class_list":["post-4953","post","type-post","status-publish","format-standard","hentry","content-type-updates","review-flag-2-1593580436-981","review-flag-inter-1593580292-678","review-flag-lever-1593580264-545","review-flag-new-1593580247-437"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Microsoft Drivers for PHP for SQL Server 2.0 released!! - Microsoft SQL Server Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Microsoft Drivers for PHP for SQL Server 2.0 released!! - Microsoft SQL Server Blog\" \/>\n<meta property=\"og:description\" content=\"Microsoft\u00a0is announcing an important interoperability milestone: the release of the Microsoft Drivers for PHP for SQL Server 2.0!! The major highlight of this release is the addition of the PDO_SQLSRV driver, which adds support for PHP Data Objects (PDO).\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft SQL Server Blog\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/sqlserver\" \/>\n<meta property=\"article:published_time\" content=\"2010-08-05T15:35:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-23T06:50:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2018\/03\/3527.image_thumb_23E1968D.png\" \/>\n<meta name=\"author\" content=\"SQL Server Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SQLServer\" \/>\n<meta name=\"twitter:site\" content=\"@SQLServer\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"SQL Server Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 min read\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/\"},\"author\":[{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/author\/sql-server-team\/\",\"@type\":\"Person\",\"@name\":\"SQL Server Team\"}],\"headline\":\"Microsoft Drivers for PHP for SQL Server 2.0 released!!\",\"datePublished\":\"2010-08-05T15:35:00+00:00\",\"dateModified\":\"2024-01-23T06:50:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/\"},\"wordCount\":1220,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2018\/03\/3527.image_thumb_23E1968D.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/\",\"name\":\"Microsoft Drivers for PHP for SQL Server 2.0 released!! - Microsoft SQL Server Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2018\/03\/3527.image_thumb_23E1968D.png\",\"datePublished\":\"2010-08-05T15:35:00+00:00\",\"dateModified\":\"2024-01-23T06:50:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#primaryimage\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2018\/03\/3527.image_thumb_23E1968D.png\",\"contentUrl\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2018\/03\/3527.image_thumb_23E1968D.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Microsoft Drivers for PHP for SQL Server 2.0 released!!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#website\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/\",\"name\":\"Microsoft SQL Server Blog\",\"description\":\"Official News from Microsoft\u2019s Information Platform\",\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization\",\"name\":\"Microsoft SQL Server Blog\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png\",\"contentUrl\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png\",\"width\":259,\"height\":194,\"caption\":\"Microsoft SQL Server Blog\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"http:\/\/www.facebook.com\/sqlserver\",\"https:\/\/x.com\/SQLServer\",\"https:\/\/www.youtube.com\/user\/MSCloudOS\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Microsoft Drivers for PHP for SQL Server 2.0 released!! - Microsoft SQL Server Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/","og_locale":"en_US","og_type":"article","og_title":"Microsoft Drivers for PHP for SQL Server 2.0 released!! - Microsoft SQL Server Blog","og_description":"Microsoft\u00a0is announcing an important interoperability milestone: the release of the Microsoft Drivers for PHP for SQL Server 2.0!! The major highlight of this release is the addition of the PDO_SQLSRV driver, which adds support for PHP Data Objects (PDO).","og_url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/","og_site_name":"Microsoft SQL Server Blog","article_publisher":"http:\/\/www.facebook.com\/sqlserver","article_published_time":"2010-08-05T15:35:00+00:00","article_modified_time":"2024-01-23T06:50:11+00:00","og_image":[{"url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2018\/03\/3527.image_thumb_23E1968D.png","type":"","width":"","height":""}],"author":"SQL Server Team","twitter_card":"summary_large_image","twitter_creator":"@SQLServer","twitter_site":"@SQLServer","twitter_misc":{"Written by":"SQL Server Team","Est. reading time":"5 min read"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#article","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/"},"author":[{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/author\/sql-server-team\/","@type":"Person","@name":"SQL Server Team"}],"headline":"Microsoft Drivers for PHP for SQL Server 2.0 released!!","datePublished":"2010-08-05T15:35:00+00:00","dateModified":"2024-01-23T06:50:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/"},"wordCount":1220,"commentCount":1,"publisher":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization"},"image":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#primaryimage"},"thumbnailUrl":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2018\/03\/3527.image_thumb_23E1968D.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/","name":"Microsoft Drivers for PHP for SQL Server 2.0 released!! - Microsoft SQL Server Blog","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#primaryimage"},"image":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#primaryimage"},"thumbnailUrl":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2018\/03\/3527.image_thumb_23E1968D.png","datePublished":"2010-08-05T15:35:00+00:00","dateModified":"2024-01-23T06:50:11+00:00","breadcrumb":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#primaryimage","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2018\/03\/3527.image_thumb_23E1968D.png","contentUrl":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2018\/03\/3527.image_thumb_23E1968D.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2010\/08\/05\/microsoft-drivers-for-php-for-sql-server-2-0-released\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/"},{"@type":"ListItem","position":2,"name":"Microsoft Drivers for PHP for SQL Server 2.0 released!!"}]},{"@type":"WebSite","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#website","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/","name":"Microsoft SQL Server Blog","description":"Official News from Microsoft\u2019s Information Platform","publisher":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization","name":"Microsoft SQL Server Blog","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png","contentUrl":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png","width":259,"height":194,"caption":"Microsoft SQL Server Blog"},"image":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/www.facebook.com\/sqlserver","https:\/\/x.com\/SQLServer","https:\/\/www.youtube.com\/user\/MSCloudOS"]}]}},"msxcm_display_generated_audio":false,"msxcm_animated_featured_image":null,"_links":{"self":[{"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/posts\/4953","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/users\/1457"}],"replies":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/comments?post=4953"}],"version-history":[{"count":0,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/posts\/4953\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/media?parent=4953"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/post_tag?post=4953"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/product?post=4953"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/content-type?post=4953"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/topic?post=4953"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/coauthors?post=4953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}