Stop script running if it fails to connect/select db
Merge pull request #1 from mikefrancis/patch-1

Stop script running if it fails to connect/select db