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
109109 $ conn = $ this ->connection ;
110110 $ res = false ;
111111
112- # [START cloud_sql_server_pdo_connection]
113112 # [START cloud_sql_sqlserver_pdo_connection]
114113 // Use prepared statements to guard against SQL injection.
115114 $ sql = "INSERT INTO votes (time_cast, vote_value) VALUES (GETDATE(), :voteValue) " ;
@@ -128,7 +127,6 @@ public function insertVote(string $value): bool
128127 );
129128 }
130129 # [END cloud_sql_sqlserver_pdo_connection]
131- # [END cloud_sql_server_pdo_connection]
132130
133131 return $ res ;
134132 }
Original file line number Diff line number Diff line change 5050 $ dsn = sprintf ('sqlsrv:server=%s;Database=%s ' , $ host , $ db_name );
5151
5252 // Connect to the database.
53- # [START cloud_sql_server_pdo_timeout]
5453 # [START cloud_sql_sqlserver_pdo_timeout]
5554 // Here we set the connection timeout to five seconds and ask PDO to
5655 // throw an exception if any errors occur.
5958 PDO ::ATTR_ERRMODE => PDO ::ERRMODE_EXCEPTION
6059 ]);
6160 # [END cloud_sql_sqlserver_pdo_timeout]
62- # [END cloud_sql_server_pdo_timeout]
6361 # [END cloud_sql_sqlserver_pdo_create_tcp]
6462 } catch (TypeError $ e ) {
6563 throw new RuntimeException (
You can’t perform that action at this time.
0 commit comments