SELECT * FROM users ORDER BY last_login ASC LIMIT $begin, $end