Skip to content

Commit eb216ca

Browse files
committed
Modifed based on the recommendations from Acrolinx
1 parent 384a2be commit eb216ca

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

docs/connect/php/pdostatement-bindparam.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Binds a parameter to a named or question mark placeholder in the SQL statement.
2424

2525
```
2626
27-
bool PDOStatement::bindParam($parameter, &$variable [,$data_type[, $length[, $driver_options]]]);
27+
bool PDOStatement::bindParam($parameter, &$variable[, $data_type[, $length[, $driver_options]]]);
2828
```
2929

3030
#### Parameters
31-
$*parameter*: A (mixed) parameter identifier. For a statement using named placeholders, a parameter name (:name). For a prepared statement using the question mark syntax, this will be the 1-based index of the parameter.
31+
$*parameter*: A (mixed) parameter identifier. For a statement using named placeholders, use a parameter name (:name). For a prepared statement using the question mark syntax, it is the 1-based index of the parameter.
3232

3333
&$*variable*: The (mixed) name of the PHP variable to bind to the SQL statement parameter.
3434

@@ -42,7 +42,7 @@ $*driver_options*: The optional (mixed) driver-specific options. For example, yo
4242
TRUE on success, otherwise FALSE.
4343

4444
## Remarks
45-
When binding null data to server columns of type varbinary, binary, or varbinary(max) you should specify binary encoding (PDO::SQLSRV_ENCODING_BINARY) using the $*driver_options*. See [Constants](../../connect/php/constants-microsoft-drivers-for-php-for-sql-server.md) for more information about encoding constants.
45+
When binding null data to server columns of type varbinary, binary, or varbinary(max) you should specify binary encoding (PDO::SQLSRV_ENCODING_BINARY) using the $*driver_options*. For more information about encoding constants, see [Constants](../../connect/php/constants-microsoft-drivers-for-php-for-sql-server.md).
4646

4747
Support for PDO was added in version 2.0 of the [!INCLUDE[ssDriverPHP](../../includes/ssdriverphp_md.md)].
4848

docs/connect/php/pdostatement-bindvalue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ bool PDOStatement::bindValue($parameter, $value[, $data_type]);
2828
```
2929

3030
#### Parameters
31-
$*parameter*: A (mixed) parameter identifier. For a statement using named placeholders, a parameter name (:name). For a prepared statement using the question mark syntax, this will be the 1-based index of the parameter.
31+
$*parameter*: A (mixed) parameter identifier. For a statement using named placeholders, use a parameter name (:name). For a prepared statement using the question mark syntax, it is the 1-based index of the parameter.
3232

3333
$*value*: The (mixed) value to bind to the parameter.
3434

docs/connect/php/sqlsrv-prepare.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ sqlsrv_prepare(resource $conn, string $tsql [, array $params [, array $options]]
3939

4040
*$tsql*: The Transact-SQL expression that corresponds to the created statement.
4141

42-
*$params* [OPTIONAL]: An **array** of values that correspond to parameters in a parameterized query. Each element of the array can be one of the following:
42+
*$params* [OPTIONAL]: An **array** of values that correspond to parameters in a parameterized query. Each element of the array can be one of the followings:
4343

4444
- A literal value.
4545

@@ -52,7 +52,7 @@ sqlsrv_prepare(resource $conn, string $tsql [, array $params [, array $options]]
5252
```
5353
5454
> [!NOTE]
55-
> Variables passed as query parameters should be passed by reference instead of by value. For example, pass `&$myVariable` instead of `$myVariable`. A PHP warning will be raised when a query with by-value parameters is executed.
55+
> Variables passed as query parameters should be passed by reference instead of by value. For example, pass `&$myVariable` instead of `$myVariable`. A PHP warning is raised when a query with by-value parameters is executed.
5656
5757
The following table describes these array elements:
5858
@@ -63,11 +63,11 @@ sqlsrv_prepare(resource $conn, string $tsql [, array $params [, array $options]]
6363
|*$phpType*[OPTIONAL]|A **SQLSRV_PHPTYPE_\*** constant that specifies PHP data type of the returned value.|
6464
|*$sqlType*[OPTIONAL]|A **SQLSRV_SQLTYPE_\*** constant that specifies the SQL Server data type of the input value.|
6565
66-
*$options* [OPTIONAL]: An associative array that sets query properties. The table below lists the supported keys and corresponding values:
66+
*$options* [OPTIONAL]: An associative array that sets query properties. The following table lists the supported keys and corresponding values:
6767
6868
|Key|Supported values|Description|
6969
|-------|--------------------|---------------|
70-
|QueryTimeout|A positive integer value.|Sets the query timeout in seconds. By default, the driver will wait indefinitely for results.|
70+
|QueryTimeout|A positive integer value.|Sets the query timeout in seconds. By default, the driver waits indefinitely for results.|
7171
|SendStreamParamsAtExec|**true** or **false**<br /><br />The default value is **true**.|Configures the driver to send all stream data at execution (**true**), or to send stream data in chunks (**false**). By default, the value is set to **true**. For more information, see [sqlsrv_send_stream_data](../../connect/php/sqlsrv-send-stream-data.md).|
7272
|Scrollable|SQLSRV_CURSOR_FORWARD<br /><br />SQLSRV_CURSOR_STATIC<br /><br />SQLSRV_CURSOR_DYNAMIC<br /><br />SQLSRV_CURSOR_KEYSET<br /><br />SQLSRV_CURSOR_CLIENT_BUFFERED|For more information about these values, see [Specifying a Cursor Type and Selecting Rows](../../connect/php/specifying-a-cursor-type-and-selecting-rows.md).|
7373

docs/connect/php/sqlsrv-query.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ sqlsrv_query(resource $conn, string $tsql [, array $params [, array $options]])
3939

4040
*$tsql*: The Transact-SQL expression that corresponds to the prepared statement.
4141

42-
*$params* [OPTIONAL]: An **array** of values that correspond to parameters in a parameterized query. Each element of the array can be one of the following:
42+
*$params* [OPTIONAL]: An **array** of values that correspond to parameters in a parameterized query. Each element of the array can be one of the followings:
4343

4444
- A literal value.
4545

@@ -51,7 +51,7 @@ sqlsrv_query(resource $conn, string $tsql [, array $params [, array $options]])
5151
array($value [, $direction [, $phpType [, $sqlType]]])
5252
```
5353
54-
The description for each element of the array is in the table below:
54+
The description for each element of the array is in the following table:
5555
5656
|Element|Description|
5757
|-----------|---------------|
@@ -64,7 +64,7 @@ sqlsrv_query(resource $conn, string $tsql [, array $params [, array $options]])
6464
6565
|Key|Supported Values|Description|
6666
|-------|--------------------|---------------|
67-
|QueryTimeout|A positive integer value.|Sets the query timeout in seconds. By default, the driver will wait indefinitely for results.|
67+
|QueryTimeout|A positive integer value.|Sets the query timeout in seconds. By default, the driver waits indefinitely for results.|
6868
|SendStreamParamsAtExec|**true** or **false**<br /><br />The default value is **true**.|Configures the driver to send all stream data at execution (**true**), or to send stream data in chunks (**false**). By default, the value is set to **true**. For more information, see [sqlsrv_send_stream_data](../../connect/php/sqlsrv-send-stream-data.md).|
6969
|Scrollable|SQLSRV_CURSOR_FORWARD<br /><br />SQLSRV_CURSOR_STATIC<br /><br />SQLSRV_CURSOR_DYNAMIC<br /><br />SQLSRV_CURSOR_KEYSET<br /><br />SQLSRV_CURSOR_CLIENT_BUFFERED|For more information about these values, see [Specifying a Cursor Type and Selecting Rows](../../connect/php/specifying-a-cursor-type-and-selecting-rows.md).|
7070
@@ -124,7 +124,7 @@ sqlsrv_close($conn);
124124
```
125125
126126
## Example
127-
The example below updates a field in the *Sales.SalesOrderDetail* table of the AdventureWorks database. The example assumes that SQL Server and the [AdventureWorks](http://go.microsoft.com/fwlink/?LinkID=67739) database are installed on the local computer. All output is written to the console when the example is run from the command line.
127+
The following example updates a field in the *Sales.SalesOrderDetail* table of the AdventureWorks database. The example assumes that SQL Server and the [AdventureWorks](http://go.microsoft.com/fwlink/?LinkID=67739) database are installed on the local computer. All output is written to the console when the example is run from the command line.
128128
129129
```
130130
<?php

0 commit comments

Comments
 (0)