Contacts: Properly prepare query and quote values. thx @eMerzh :)