query problem - select * from agreement where mid=