コード例 #1
0
 public function dbt2udt($type, &$len, &$default)
 {
     $type = parent::dbt2udt($type, $len, $default);
     switch ($type) {
         case 'float':
             return 'real';
         case 'double':
             return 'float';
         case 'timestamp':
             # DATETIME real type is TIMESTAMP
             if ($default == "'1970-01-01 00:00:00'") {
                 # Bad hack
                 $default = 'now()';
             }
             return 'timestamp';
         case 'integer':
         case 'mediumint':
         case 'bigint':
         case 'tinyint':
         case 'smallint':
         case 'numeric':
             return 'integer';
         case 'tinytext':
         case 'longtext':
             return 'text';
     }
     return $type;
 }
コード例 #2
0
 public function dbt2udt($type, &$len, &$default)
 {
     $type = parent::dbt2udt($type, $len, $default);
     return $type;
 }