1
I have the following table:
CREATE TABLE `adm_historico_acesso` (
`id` int(10) UNSIGNED NOT NULL,
`data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ip` varchar(100) NOT NULL,
`usuario` varchar(100),
`codigo` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
) ENGINE = MyISAM DEFAULT CHARSET = latin1;
Would like a select
which shows the following result:
Display the last time each usuario
logged into the system (based on the date field), and the code field is intended for when it misses the login
, then it would have to display the last valid login and last login attempt with error (the code would have the result erro
).
You want the
último login com sucesso e com erro
,de cada usuário
, that’s it ?– rbz