Skip to content

Commit 2f93871

Browse files
authored
Merge pull request #1 from seekerliu/master
解决 sql 语句中带 DATE_FORMAT 时的 vsprintf 不正确的问题
2 parents a6ad71b + f0782b4 commit 2f93871

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function boot()
2525
{
2626
Log::info('============ URL: '.request()->fullUrl().' ===============');
2727
DB::listen(function (QueryExecuted $query) {
28-
$sqlWithPlaceholders = str_replace('?', '%s', $query->sql);
28+
$sqlWithPlaceholders = str_replace(['?','%'], ['%s','%%'], $query->sql);
2929

3030
$bindings = $query->connection->prepareBindings($query->bindings);
3131
$pdo = $query->connection->getPdo();

0 commit comments

Comments
 (0)