read db_type from $GLOBALS[phpgw_info][server]

corrected behavior for column-default 0
This commit is contained in:
Ralf Becker 2002-05-11 13:01:31 +00:00
parent 227885f046
commit 13685a647e

View File

@ -166,7 +166,7 @@
} }
else // import else // import
{ {
$oProc = CreateObject('phpgwapi.schema_proc','mysql'); $oProc = CreateObject('phpgwapi.schema_proc',$GLOBALS['phpgw_info']['server']['db_type']);
$oProc->m_odb = $GLOBALS['phpgw']->db; $oProc->m_odb = $GLOBALS['phpgw']->db;
$oProc->m_oTranslator->_GetColumns($oProc,$content['new_table_name'],$nul); $oProc->m_oTranslator->_GetColumns($oProc,$content['new_table_name'],$nul);
@ -302,7 +302,7 @@
$col_defs['fk'] = $table['fk'][$col_name]; $col_defs['fk'] = $table['fk'][$col_name];
if (isset($col_defs['default']) && $col_defs['default'] == '') if (isset($col_defs['default']) && $col_defs['default'] == '')
{ {
$col_defs['default'] = "''"; // spezial value for empty, but set, default $col_defs['default'] = is_int($col_defs['default']) ? '0' : "''"; // spezial value for empty, but set, default
} }
$col_defs['n'] = $n; $col_defs['n'] = $n;