Skip to content

Commit f9f6980

Browse files
authored
fix: SQL Server region tags (GoogleCloudPlatform#1106)
1 parent f0d514a commit f9f6980

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cloud_sql/sqlserver/pdo/src/Votes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function insertVote(string $value) : bool
109109
$conn = $this->connection;
110110
$res = false;
111111

112-
# [START cloud_sql_sqlserver_pdo_connection]
112+
# [START cloud_sql_server_pdo_connection]
113113
// Use prepared statements to guard against SQL injection.
114114
$sql = "INSERT INTO votes (time_cast, vote_value) VALUES (GETDATE(), :voteValue)";
115115

@@ -126,7 +126,7 @@ public function insertVote(string $value) : bool
126126
$e
127127
);
128128
}
129-
# [END cloud_sql_sqlserver_pdo_connection]
129+
# [END cloud_sql_server_pdo_connection]
130130

131131
return $res;
132132
}

cloud_sql/sqlserver/pdo/src/app.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
$hostname = getenv('DB_HOSTNAME') ?: '127.0.0.1';
4242

4343
try {
44-
// # [START cloud_sql_sqlserver_pdo_create]
44+
// # [START cloud_sql_server_pdo_create]
4545
// // $username = 'your_db_user';
4646
// // $password = 'yoursupersecretpassword';
4747
// // $dbName = 'your_db_name';
@@ -50,15 +50,15 @@
5050
$dsn = sprintf('sqlsrv:server=%s;Database=%s', $hostname, $dbName);
5151

5252
// Connect to the database.
53-
# [START cloud_sql_sqlserver_pdo_timeout]
53+
# [START cloud_sql_server_pdo_timeout]
5454
// Here we set the connection timeout to five seconds and ask PDO to
5555
// throw an exception if any errors occur.
5656
$conn = new PDO($dsn, $username, $password, [
5757
PDO::ATTR_TIMEOUT => 5,
5858
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
5959
]);
60-
# [END cloud_sql_sqlserver_pdo_timeout]
61-
# [END cloud_sql_sqlserver_pdo_create]
60+
# [END cloud_sql_server_pdo_timeout]
61+
# [END cloud_sql_server_pdo_create]
6262
} catch (TypeError $e) {
6363
throw new RuntimeException(
6464
sprintf(

0 commit comments

Comments
 (0)