MySQL: code cleanup - simple is better