Skip to content

Commit c2e2065

Browse files
authored
Merge pull request #763 from ravage84/patch-1
Improve and modernize example
2 parents 518e637 + ce55733 commit c2e2065

File tree

1 file changed

+9
-7
lines changed
  • samples/tutorials/php/Ubuntu/SqlServerSample

1 file changed

+9
-7
lines changed
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<?php
2+
// Setup the connection
23
$serverName = "localhost";
3-
$connectionOptions = array(
4+
$connectionOptions = [
45
"Database" => "SampleDB",
56
"Uid" => "sa",
67
"PWD" => "your_password"
7-
);
8-
//Establishes the connection
9-
$conn = sqlsrv_connect($serverName, $connectionOptions);
10-
if($conn)
11-
echo "Connected!"
12-
?>
8+
];
9+
10+
// Establish the connection
11+
$connection = sqlsrv_connect($serverName, $connectionOptions);
12+
if ($connection) {
13+
echo "Connected!";
14+
}

0 commit comments

Comments
 (0)