Use prepared statements instead of generating query string every time.