SQL select updates

Layers and fields read from userConfig.
Fields change with layers.
Extra rows deleted on layer change