Updated db adpater

Implemented get inquiry by id