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