SQL select_db error occurred - error logged