changed names of some fields in database and home sql query