|
@@ -420,6 +420,7 @@ class Core_Database_Mysql extends Core_Database {
|
|
|
else if(strstr($Struct->Type,"multilinestring")) $col[]=' AsWKT(`'.$Field.'`) as "'.$Field.'"';
|
|
else if(strstr($Struct->Type,"multilinestring")) $col[]=' AsWKT(`'.$Field.'`) as "'.$Field.'"';
|
|
|
else if(strstr($Struct->Type,"polygon")) $col[]=' AsWKT(`'.$Field.'`) as "'.$Field.'"';
|
|
else if(strstr($Struct->Type,"polygon")) $col[]=' AsWKT(`'.$Field.'`) as "'.$Field.'"';
|
|
|
else if(strstr($Struct->Type,"multipolygon")) $col[]=' AsWKT(`'.$Field.'`) as "'.$Field.'"';
|
|
else if(strstr($Struct->Type,"multipolygon")) $col[]=' AsWKT(`'.$Field.'`) as "'.$Field.'"';
|
|
|
|
|
+ else if(strstr($Struct->Type,"point")) $col[]=' AsWKT(`'.$Field.'`) as "'.$Field.'"';
|
|
|
|
|
|
|
|
else $col[]='`'.$Field.'`';
|
|
else $col[]='`'.$Field.'`';
|
|
|
}
|
|
}
|
|
@@ -432,7 +433,7 @@ class Core_Database_Mysql extends Core_Database {
|
|
|
function MAKE_DB_OBJ($table,$obj,$dieonerror=null) {
|
|
function MAKE_DB_OBJ($table,$obj,$dieonerror=null) {
|
|
|
$structure=self::describe_table_value($table); //todo to cache optimize
|
|
$structure=self::describe_table_value($table); //todo to cache optimize
|
|
|
foreach(get_object_vars($obj) as $k=>$v) {
|
|
foreach(get_object_vars($obj) as $k=>$v) {
|
|
|
- if(($structure[$k]->Type=='multipoint')||($structure[$k]->Type=='linestring')||($structure[$k]->Type=='polygon')||($structure[$k]->Type=='multipolygon')||($structure[$k]->Type=='multilinestring')) {
|
|
|
|
|
|
|
+ if(($structure[$k]->Type=='multipoint')||($structure[$k]->Type=='point')||($structure[$k]->Type=='linestring')||($structure[$k]->Type=='polygon')||($structure[$k]->Type=='multipolygon')||($structure[$k]->Type=='multilinestring')) {
|
|
|
if(empty($v)) {
|
|
if(empty($v)) {
|
|
|
unset($k);
|
|
unset($k);
|
|
|
unset($v);
|
|
unset($v);
|
|
@@ -1007,6 +1008,7 @@ class Core_Database_Mysql extends Core_Database {
|
|
|
|| ( strstr($VAL->Type, 'decimal(42') ) && strstr($ARR_TABLE['FIELDS'][$INDEX_OF_CONFIG_TABLE]->Type, 'decimal(41' )
|
|
|| ( strstr($VAL->Type, 'decimal(42') ) && strstr($ARR_TABLE['FIELDS'][$INDEX_OF_CONFIG_TABLE]->Type, 'decimal(41' )
|
|
|
|| ( strstr($VAL->Type, 'decimal(43') ) && strstr($ARR_TABLE['FIELDS'][$INDEX_OF_CONFIG_TABLE]->Type, 'decimal(41' )
|
|
|| ( strstr($VAL->Type, 'decimal(43') ) && strstr($ARR_TABLE['FIELDS'][$INDEX_OF_CONFIG_TABLE]->Type, 'decimal(41' )
|
|
|
|| ( strstr($VAL->Type, 'multipoint') ) && strstr($ARR_TABLE['FIELDS'][$INDEX_OF_CONFIG_TABLE]->Type, 'multipoint' )
|
|
|| ( strstr($VAL->Type, 'multipoint') ) && strstr($ARR_TABLE['FIELDS'][$INDEX_OF_CONFIG_TABLE]->Type, 'multipoint' )
|
|
|
|
|
+ || ( strstr($VAL->Type, 'point') ) && strstr($ARR_TABLE['FIELDS'][$INDEX_OF_CONFIG_TABLE]->Type, 'point' )
|
|
|
|| ( strstr($VAL->Type, 'date') ) && strstr($ARR_TABLE['FIELDS'][$INDEX_OF_CONFIG_TABLE]->Type, 'char' )
|
|
|| ( strstr($VAL->Type, 'date') ) && strstr($ARR_TABLE['FIELDS'][$INDEX_OF_CONFIG_TABLE]->Type, 'char' )
|
|
|
|| ( strstr($VAL->Type, 'date') ) && strstr('varchar',$ARR_TABLE['FIELDS'][$INDEX_OF_CONFIG_TABLE]->Type )
|
|
|| ( strstr($VAL->Type, 'date') ) && strstr('varchar',$ARR_TABLE['FIELDS'][$INDEX_OF_CONFIG_TABLE]->Type )
|
|
|
|| ( strstr($VAL->Type, 'datetime') ) && strstr($ARR_TABLE['FIELDS'][$INDEX_OF_CONFIG_TABLE]->Type, 'char' )
|
|
|| ( strstr($VAL->Type, 'datetime') ) && strstr($ARR_TABLE['FIELDS'][$INDEX_OF_CONFIG_TABLE]->Type, 'char' )
|