db query working on edit activity