File tree Expand file tree Collapse file tree 2 files changed +0
-4
lines changed
cloud_sql/sqlserver/pdo/src Expand file tree Collapse file tree 2 files changed +0
-4
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,6 @@ public function insertVote(string $value): bool
109
109
$ conn = $ this ->connection ;
110
110
$ res = false ;
111
111
112
- # [START cloud_sql_server_pdo_connection]
113
112
# [START cloud_sql_sqlserver_pdo_connection]
114
113
// Use prepared statements to guard against SQL injection.
115
114
$ sql = "INSERT INTO votes (time_cast, vote_value) VALUES (GETDATE(), :voteValue) " ;
@@ -128,7 +127,6 @@ public function insertVote(string $value): bool
128
127
);
129
128
}
130
129
# [END cloud_sql_sqlserver_pdo_connection]
131
- # [END cloud_sql_server_pdo_connection]
132
130
133
131
return $ res ;
134
132
}
Original file line number Diff line number Diff line change 50
50
$ dsn = sprintf ('sqlsrv:server=%s;Database=%s ' , $ host , $ db_name );
51
51
52
52
// Connect to the database.
53
- # [START cloud_sql_server_pdo_timeout]
54
53
# [START cloud_sql_sqlserver_pdo_timeout]
55
54
// Here we set the connection timeout to five seconds and ask PDO to
56
55
// throw an exception if any errors occur.
59
58
PDO ::ATTR_ERRMODE => PDO ::ERRMODE_EXCEPTION
60
59
]);
61
60
# [END cloud_sql_sqlserver_pdo_timeout]
62
- # [END cloud_sql_server_pdo_timeout]
63
61
# [END cloud_sql_sqlserver_pdo_create_tcp]
64
62
} catch (TypeError $ e ) {
65
63
throw new RuntimeException (
You can’t perform that action at this time.
0 commit comments