Selaa lähdekoodia

Update: fixed select condition error

Zhu Jinhui 6 vuotta sitten
vanhempi
commit
570fe1b8b4
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      src/Driver/Base.php

+ 4 - 0
src/Driver/Base.php

@@ -812,6 +812,10 @@ class Base
      */
     final function createSelectSQL($table)
     {
+
+        if(stristr($table, '.') == false && stristr($table, '`') == false) {
+            $table = '`'. $table .'`';
+        }
         $sql = sprintf($this->_query['SELECT'], ((trim($this->fields) != '') ? $this->fields : "*"), $table) . $this->join . $this->where . $this->groupBy . $this->orderBy . $this->limit;
         $this->cleanData();
         return $sql;