Hi there SQL folk,
I'm currently logging all login activity into a table, what I'd like to do is have a flag returned if a certain user has had a certain number of consecutivefailed attempts in a given period, say 24 hours?
My rather poor SQL skills have this as a skeleton:-
Code MySQL:
Code MySQL:CREATE TABLE IF NOT EXISTS `user_login_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `supplied_username` varchar(50) COLLATE utf8_bin NOT NULL, `ip_address` varchar(20) COLLATE utf8_bin DEFAULT NULL, `user_agent` varchar(255) COLLATE utf8_bin DEFAULT NULL, `created_on` datetime NOT NULL, `was_successful` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=11 ;
I'd really appreciate some help here.
Thanks,
Anthony.





Bookmarks