Skip to content

Commit

Permalink
Merge pull request #28 from Valerii1993/escape_pdo_question_mark_para…
Browse files Browse the repository at this point in the history
…m_placeholder

Support to: RFC: Escape PDO "?" parameter placeholder
  • Loading branch information
overtrue authored Jul 1, 2021
2 parents 9c037e2 + 366b5f3 commit ad76e00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function boot()
return;
}

$sqlWithPlaceholders = str_replace(['%', '?'], ['%%', '%s'], $query->sql);
$sqlWithPlaceholders = str_replace(['%', '?', '%s%s'], ['%%', '%s', '?'], $query->sql);

$bindings = $query->connection->prepareBindings($query->bindings);
$pdo = $query->connection->getPdo();
Expand Down

0 comments on commit ad76e00

Please sign in to comment.