did more spicific error messages
Made the sql querquery correctly