Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function search($title)

In the first case, the title variable is simply escaped and quoted. Any quote characters in the title string will be prepended with a backslash and the whole string will be wrapped in quotes.

In the second case, the example shows how to treat a search string that will be used in a `LIKE` clause. In this case, the title variable is manually escaped using `escape` with a second argument of `true`. This will force other special characters to be escaped (otherwise you could set youself up for serious performance problems if the user includes too many wildcards). Then, the result is passed to the `quote` method but escaping is turned off (because it has already been done manually).
In the second case, the example shows how to treat a search string that will be used in a `LIKE` clause. In this case, the title variable is manually escaped using `escape` with a second argument of `true`. This will force other special characters to be escaped (otherwise you could set yourself up for serious performance problems if the user includes too many wildcards). Then, the result is passed to the `quote` method but escaping is turned off (because it has already been done manually).

In the third case, the title variable is an array so the whole array can be passed to the `quote` method (this saves using a closure and a )

Expand Down Expand Up @@ -118,7 +118,7 @@ $count = count($iterator);
```
## Logging

`Database\DatabaseDriver` implements the `Psr\Log\LoggerAwareInterface` so is ready for intergrating with a logging package that supports that standard.
`Database\DatabaseDriver` implements the `Psr\Log\LoggerAwareInterface` so is ready for integrating with a logging package that supports that standard.

Drivers log all errors with a log level of `LogLevel::ERROR`.

Expand Down
4 changes: 2 additions & 2 deletions src/Sqlsrv/SqlsrvQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ protected function fixGroupColumns($selectColumns)
$alias = end($table);
$table = $table[0];

// Chek if exists a wildcard with current alias table?
// Check if exists a wildcard with current alias table?
if (\in_array($alias, $wildcardTables, true)) {
if (!isset($cacheCols[$table])) {
$cacheCols[$table] = $this->db->getTableColumns($table);
Expand Down Expand Up @@ -744,7 +744,7 @@ protected function fixGroupColumns($selectColumns)
$table = $matches[1];
$alias = $matches[2] ?? $table;

// Chek if exists a wildcard with current alias table?
// Check if exists a wildcard with current alias table?
if (\in_array($alias, $wildcardTables, true)) {
if (!isset($cacheCols[$table])) {
$cacheCols[$table] = $this->db->getTableColumns($table);
Expand Down
Loading