Improved mysql saving system