Skip to content

Commit 9387ed0

Browse files
committed
Replace non-standard use of comment sign with official multi line comment
This also improves readability.
1 parent 33c7a03 commit 9387ed0

File tree

1 file changed

+12
-3
lines changed
  • samples/tutorials/php/2.0 PHP Server programming - Stored procedures, Transactions, and UDFs

1 file changed

+12
-3
lines changed

samples/tutorials/php/2.0 PHP Server programming - Stored procedures, Transactions, and UDFs/test.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
];
88
// Establishes the connection
99
$conn = sqlsrv_connect($serverName, $connectionOptions);
10-
////////////////// STORED PROCEDURE /////////////////////////
10+
11+
/*
12+
* Stored Procedure
13+
*/
14+
1115
$tsql = "CREATE PROCEDURE sp_GetCompanies22 AS BEGIN SELECT [CompanyName] FROM SalesLT.Customer END";
1216
$storedProc = sqlsrv_query($conn, $tsql);
1317
if ($storedProc == false) {
@@ -50,7 +54,10 @@
5054
sqlsrv_free_stmt($storedProc);
5155
?>
5256
<?php
53-
////////////////// TRANSACTION /////////////////////////
57+
/*
58+
* Transaction
59+
*/
60+
5461
if (sqlsrv_begin_transaction($conn) == false) {
5562
echo "Error opening connection";
5663
die(FormatErrors(sqlsrv_errors()));
@@ -85,7 +92,9 @@
8592

8693
?>
8794
<?php
88-
////////////////// UDF /////////////////////////
95+
/*
96+
* UDF
97+
*/
8998
// Dropping function if it already exists
9099
$tsql1 = "IF OBJECT_ID(N'dbo.ifGetTotalItems', N'IF') IS NOT NULL DROP FUNCTION dbo.ifGetTotalItems;";
91100
$getProducts = sqlsrv_query($conn, $tsql1);

0 commit comments

Comments
 (0)