diff --git a/MysqliDb.php b/MysqliDb.php index ab88d03..17bf8ae 100644 --- a/MysqliDb.php +++ b/MysqliDb.php @@ -556,6 +556,10 @@ public function rawAddPrefix($query){ preg_match_all("/(from|into|update|join|describe) [\\'\\´]?([a-zA-Z0-9_-]+)[\\'\\´]?/i", $query, $matches); list($from_table, $from, $table) = $matches; + // Check if there are matches + if (empty($table[0])) + return $query; + return str_replace($table[0], self::$prefix.$table[0], $query); }