query("update ecmproductstockindexs set main='0'"); $GLOBALS['db']->query("update ecmproductstockindexs set main='1' where id='".$_REQUEST['record']."'"); header("Location: index.php?module=EcmProductStockIndexs&action=index"); ?>