I have a table "login_attempts" with the fields: id, ip, login_name, time.
I want to achieve this:
Count the number of occurrences for the last 10 minutes for a particular login_name.
I'd like to know the query statement in CodeIgniter's active records format?