Execute($sql); while(!$items_rs->EOF) { $module_info['item_id'] = $items_rs->fields[ $module_info['id_field'] ]; $filename = StripDisallowed($items_rs->fields[ $module_info['title_field'] ], $module_info); $sql = 'UPDATE '.$table_prefix.$module_info['table'].' SET AutomaticFilename = 1, Filename = '.$inst_ado->qstr($filename).' WHERE '.$module_info['id_field'].' = '.$module_info['item_id']; $inst_ado->Execute($sql); $items_rs->MoveNext(); } $primary = $inst_ado->GetOne('SELECT LanguageId FROM '.$table_prefix.'Language WHERE PrimaryLang = 1'); $query = 'UPDATE '.$table_prefix.'Products SET l'.$primary.'_Description = Description'; $inst_ado->Execute($query); $query = 'UPDATE '.$table_prefix.'Products SET l'.$primary.'_DescriptionExcerpt = DescriptionExcerpt'; $inst_ado->Execute($query); $query = 'SELECT UnitSystem FROM '.$table_prefix.'Language WHERE PrimaryLang = 1'; $unit_sys = $inst_ado->GetOne($query); if ($unit_sys == 2) { $query = 'UPDATE '.$table_prefix.'Products SET Weight = Weight * 0.90718474'; $inst_ado->Execute($query); $query = 'SELECT ShippingID FROM '.$table_prefix.'ShippingType WHERE Type = 1'; $types = $inst_ado->GetCol($query); if ($types) { $query = 'UPDATE '.$table_prefix.'ShippingBrackets SET Start = Start * 0.45359237, End = IF(End != -1, End * 0.45359237, -1) WHERE ShippingTypeID IN ('.join(',', $types).')'; $inst_ado->Execute($query); } } ?>