Skip to content

Instantly share code, notes, and snippets.

@v-mabarw
v-mabarw / php_sqlsrv_prob.txt
Created July 29, 2014 22:42
CodePlex Issue #22418 Plain Text Attachments
<?php
$connectionInfo = array( "Database"=>"Knowledgeroot2", "UID"=>"sa", "PWD"=>"Integra4711");
$conn = sqlsrv_connect( "WIN-3U11NKJ7P3U\SQLEXPRESS", $connectionInfo);
$sql = 'INSERT INTO "content" ("parent", "name", "content", "created_by", "changed_by", "create_date", "change_date") VALUES (?, ?, ?, ?, ?, ?, ?) SELECT SCOPE_IDENTITY() as Current_Identity';
$params = array(1, 'TTTTTTTTTTTTT', 'TTTTTTTTTTTTT', 0, 0, '20121128 20:01:57', '20121128 20:01:57');
$stmt = sqlsrv_query( $conn, $sql, $params);
if( $stmt === false ) {
@v-mabarw
v-mabarw / repro_sqlsrv_field_metadata_issue.php
Created July 29, 2014 22:42
CodePlex Issue #22417 Plain Text Attachments
<?php
sqlsrv_configure( 'WarningsReturnAsErrors', false );
print_r( "calling connect", true );
$c = sqlsrv_connect( '(local)', array( 'Database' => 'master' ));
if( $c === false ) {
die( print_r( sqlsrv_errors(), true ));
}
@v-mabarw
v-mabarw / adodb-mssqlnative.inc.php
Created July 29, 2014 22:41
CodePlex Issue #20183 Plain Text Attachments
<?php
/*
V5.11 5 May 2010 (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
Set tabs to 4 for best viewing.
Latest version is available at http://adodb.sourceforge.net
@v-mabarw
v-mabarw / SQLSRV_Reflection.patch
Created July 29, 2014 22:41
CodePlex Issue #17486 Plain Text Attachments
Index: init.cpp
===================================================================
--- init.cpp (revision 49994)
+++ init.cpp (working copy)
@@ -34,134 +34,134 @@
// argument info structures for functions, arranged alphabetically.
// see zend_API.h in the PHP sources for more information about these macros
ZEND_BEGIN_ARG_INFO_EX( sqlsrv_begin_transaction_arginfo, 0, 0, 1 )
- ZEND_ARG_INFO( 0, "connection resource" )
+ ZEND_ARG_INFO( 0, connection resource )
@v-mabarw
v-mabarw / SQLSRVPHP_phpinfo.patch
Created July 29, 2014 22:40
CodePlex Issue #17186 Plain Text Attachments
Index: init.cpp
===================================================================
--- init.cpp (revision 49436)
+++ init.cpp (working copy)
@@ -699,8 +699,9 @@
php_info_print_table_start();
php_info_print_table_header(2, "sqlsrv support", "enabled");
+ php_info_print_table_end();
+
@v-mabarw
v-mabarw / WinResch.h patch
Created July 29, 2014 22:40
CodePlex Issue #14042 Plain Text Attachments
Index: template.rc
===================================================================
--- template.rc (revision 36439)
+++ template.rc (working copy)
@@ -15,7 +15,7 @@
# error dont edit with MSVC
#endif
-#include "winres.h"
+#include "winresrc.h"