Made mysql queries safer