SELECT m.user
	FROM user u
	JOIN mysql_user m ON u.mysql_user_id = m.id
		WHERE u.name = #user AND u.password = MD5(#pass) AND u.active

