Skip to content

Commit

Permalink
[fix] raw query with JOIN keyword #894
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelaon committed Feb 6, 2020
1 parent e03bc3d commit 3abdbb8
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 @@ -445,7 +445,7 @@ protected function buildRaw($raw, &$map)
}

$query = preg_replace_callback(
'/(([`\']).*?)?((FROM|TABLE|INTO|UPDATE)\s*)?\<(([a-zA-Z0-9_]+)(\.[a-zA-Z0-9_]+)?)\>(.*?\2)?/i',
'/(([`\']).*?)?((FROM|TABLE|INTO|UPDATE|JOIN)\s*)?\<(([a-zA-Z0-9_]+)(\.[a-zA-Z0-9_]+)?)\>(.*?\2)?/i',
function ($matches)
{
if (!empty($matches[ 2 ] && isset($matches[ 8 ])))
Expand Down

0 comments on commit 3abdbb8

Please sign in to comment.