diff options
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/PicoDb/Database.php | 5 | ||||
-rw-r--r-- | vendor/PicoDb/Drivers/Mysql.php | 1 | ||||
-rw-r--r-- | vendor/PicoDb/Drivers/Sqlite.php | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/vendor/PicoDb/Database.php b/vendor/PicoDb/Database.php index 5d0beb8a..c09d8a92 100644 --- a/vendor/PicoDb/Database.php +++ b/vendor/PicoDb/Database.php @@ -86,6 +86,11 @@ class Database public function escapeIdentifier($value) { + // Do not escape custom query + if (strpos($value, '.') !== false || strpos($value, ' ') !== false) { + return $value; + } + return $this->pdo->escapeIdentifier($value); } diff --git a/vendor/PicoDb/Drivers/Mysql.php b/vendor/PicoDb/Drivers/Mysql.php index 22277a01..96148a1c 100644 --- a/vendor/PicoDb/Drivers/Mysql.php +++ b/vendor/PicoDb/Drivers/Mysql.php @@ -70,7 +70,6 @@ class Mysql extends \PDO { public function escapeIdentifier($value) { - if (strpos($value, '.') !== false) return $value; return '`'.$value.'`'; } }
\ No newline at end of file diff --git a/vendor/PicoDb/Drivers/Sqlite.php b/vendor/PicoDb/Drivers/Sqlite.php index 83b61c40..38c823ae 100644 --- a/vendor/PicoDb/Drivers/Sqlite.php +++ b/vendor/PicoDb/Drivers/Sqlite.php @@ -51,7 +51,6 @@ class Sqlite extends \PDO { public function escapeIdentifier($value) { - if (strpos($value, '.') !== false) return $value; return '"'.$value.'"'; } }
\ No newline at end of file |