--TEST-- Verify Github Issue 1307 is fixed but TVP and table are defined in a different schema --DESCRIPTION-- To show that table-valued parameters work with non-procedure statements --ENV-- PHPT_EXEC=true --SKIPIF-- --FILE-- [[15], [13], [11]], $schema]], ]; $stmt = sqlsrv_query($conn, $tsql, $params); if (!$stmt) { print_r(sqlsrv_errors()); } sqlsrv_free_stmt($stmt); // Verify the results readData($conn, $schema, $testTable); // Use Merge statement next $tsql = << [[10], [16], [14], [12]], $schema]], ]; $stmt = sqlsrv_prepare($conn, $tsql, $params); if (!$stmt) { print_r(sqlsrv_errors()); } $result = sqlsrv_execute($stmt); if (!$result) { print_r(sqlsrv_errors()); } // Verify the results readData($conn, $schema, $testTable); cleanup($conn, $tvpname, $testTable, $schema); echo "Done\n"; sqlsrv_close($conn); ?> --EXPECT-- 11 13 15 10 11 12 13 14 15 16 Done