modfied for mySQL syntax
moved db config to db_connect