/* Connects to a data source. param: one string for each connection parameter, said datasource, username, password, host and port.  */
static int env_connect(lua_State *L)
/* Connects to a data source. param: one string for each connection parameter, said datasource, username, password, host and port.  */
static int env_connect(lua_State *L)
{
		char error_msg[100];
		strncpy (error_msg,  mysql_error(conn), 99);
		mysql_close (conn);
		return luasql_failmessage (L, "Error connecting to database. MySQL: ", error_msg);
	}
	return create_connection(L, 1, conn);
}