Skip to content

Commit 589e466

Browse files
committed
Acrolinx fixes
1 parent 3e02572 commit 589e466

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

docs/connect/php/step-3-proof-of-concept-connecting-to-sql-using-php.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This **OpenConnection** function is called near the top in all of the functions
4242

4343
## Step 2: Execute query
4444

45-
The [sqlsrv_query()](https://php.net/manual/en/function.sqlsrv-query.php) function can be used to retrieve a result set from a query against SQL Database. This function essentially accepts any query and the connection object and returns a result set which can be iterated over with the use of [sqlsrv_fetch_array()](https://php.net/manual/en/function.sqlsrv-fetch-array.php).
45+
The [sqlsrv_query()](https://php.net/manual/en/function.sqlsrv-query.php) function can be used to retrieve a result set from a query against SQL Database. This function essentially accepts any query and the connection object and returns a result set, which can be iterated over with the use of [sqlsrv_fetch_array()](https://php.net/manual/en/function.sqlsrv-fetch-array.php).
4646

4747
```php
4848
function ReadData()
@@ -74,8 +74,7 @@ The [sqlsrv_query()](https://php.net/manual/en/function.sqlsrv-query.php) functi
7474

7575
## Step 3: Insert a row
7676

77-
In this example you will see how to execute an [INSERT](../../t-sql/statements/insert-transact-sql.md) statement safely, pass parameters which protect your application from [SQL injection](../../relational-databases/tables/primary-and-foreign-key-constraints.md) value.
78-
77+
In this example you will see how to execute an [INSERT](../../t-sql/statements/insert-transact-sql.md) statement safely and pass parameters. Parameter values protect your application from [SQL injection](../../relational-databases/tables/primary-and-foreign-key-constraints.md).
7978

8079
```php
8180
function InsertData()
@@ -104,7 +103,7 @@ In this example you will see how to execute an [INSERT](../../t-sql/statements/i
104103
}
105104
```
106105

107-
## Step 4: Rollback a transaction
106+
## Step 4: Roll back a transaction
108107

109108

110109
This code example demonstrates the use of transactions in which you:
@@ -113,7 +112,7 @@ This code example demonstrates the use of transactions in which you:
113112

114113
-Insert a row of data, Update another row of data
115114

116-
-Commit your transaction if the insert and update were successful and rollback the transaction if one of them was not
115+
-Commit your transaction if the insert and update were successful and roll back the transaction if one of them was not
117116

118117

119118
```php

docs/connect/php/step-4-connect-resiliently-to-sql-with-php.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.author: v-daenge
1616
[!INCLUDE[Driver_PHP_Download](../../includes/driver_php_download.md)]
1717

1818

19-
The demo program is designed so that a transient error (that is any error code with the prefix '08' as listed in this [appendix](https://docs.microsoft.com/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes)) during an attempt to connect leads to a retry. But a transient error during query command causes the program to discard the connection and create a new connection, before retrying the query command. We neither recommend nor disrecommend this design choice. The demo program illustrates some of the design flexibility that is available to you.
19+
The demo program is designed so that a transient error (that is any error code with the prefix '08' as listed in this [appendix](https://docs.microsoft.com/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes)) during an attempt to connect leads to a retry. But a transient error during query command causes the program to discard the connection and create a new connection, before retrying the query command. We do not recommend or discourage this design choice. The demo program illustrates some of the design flexibility that is available to you.
2020

2121
The length of this code sample is due mostly to the catch exception logic.
2222

0 commit comments

Comments
 (0)