Update wmsdb.php

Added some initial code from WMS side