query("select recipient_code,ecmproduct_id,ecmdevice_id from ecmdevices_ecmproducts where recipient_code!='' and recipient_code IS NOT NULL"); while($r=$GLOBALS['db']->fetchByAssoc($w)){ print "update ecmdevices_ecmproducts set recipient_code='".$r['recipient_code']."' where ecmproduct_id='".$r['ecmproduct_id']."' and ecmdevice_id='".$r['ecmdevice_id']."';
"; }