Article ID: 3146, created on Nov 30, 2007, last review on Apr 18, 2012

  • Applies to:
  • H-Sphere

Resolution

Problem: you can't delete resellers because they own ghost-users. Solution: Stop CP and run the following queries "AS IS": BEGIN TRANSACTION; SELECT * INTO users_temp FROM users WHERE NOT EXISTS (SELECT user_id FROM user_account WHERE user_id = id) AND NOT EXISTS (SELECT user_id FROM f_user_account WHERE user_id = id) AND NOT EXISTS (SELECT user_id FROM request_record WHERE deleted IS NULL and user_id = id); DELETE FROM users WHERE NOT EXISTS (SELECT user_id FROM user_account WHERE user_id = id) AND NOT EXISTS (SELECT user_id FROM f_user_account WHERE user_id = id) AND NOT EXISTS (SELECT user_id FROM request_record WHERE deleted IS NULL AND user_id = id); COMMIT; This way we back up deleted data.

f213b9fa8759d57bee5d547445806fe7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF