Skip to content

Commit

Permalink
[fix] table quotation for query() #1122
Browse files Browse the repository at this point in the history
  • Loading branch information
catfan committed Dec 4, 2024
1 parent c37be61 commit f5a77ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Medoo.php
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ protected function buildRaw($raw, array &$map): ?string
}

$query = preg_replace_callback(
'/(([`\'])[\<]*?)?((FROM|TABLE|INTO|UPDATE|JOIN|TABLE IF EXISTS)\s*)?\<((' . $this::TABLE_PATTERN . ')(\.' . $this::COLUMN_PATTERN . ')?)\>([^,]*?\2)?/',
'/(([`\'])[\<]*?)?((FROM|TABLE|TABLES LIKE|INTO|UPDATE|JOIN|TABLE IF EXISTS)\s*)?\<((' . $this::TABLE_PATTERN . ')(\.' . $this::COLUMN_PATTERN . ')?)\>([^,]*?\2)?/',
function ($matches) {
if (!empty($matches[2]) && isset($matches[8])) {
return $matches[0];
Expand Down

0 comments on commit f5a77ca

Please sign in to comment.