Rudy : getDate is also a PHP function... so I was unclear as to whether what was being written there was PHP + SQL or pure SQL.
Just read your post on it Rudy, good idea

Obviously even if someone logs in 50 times a day then when you look them up you're only looking up 50 rows for user ID and date. Nice and quick to count