workunitid); if ($wu) { echo "$r->id has a WU\n"; $found = true; break; } else { echo "$r->id has no WU - deleting\n"; $ndel++; $r->delete(); } } if ($found) break; } echo "Done - deleted $ndel results\n"; ?>