Commit a12707164c3da8073317615adbb77719a2a3952c
1 parent
69909bbe
Exists in
master
Correcao de coleta de navegadores para sqlserver e oracle
Showing
1 changed file
with
3 additions
and
5 deletions
Show diff stats
rn/MdEstatisticasColetarRN.php
... | ... | @@ -52,7 +52,7 @@ class MdEstatisticasColetarRN extends InfraRN |
52 | 52 | InfraDebug::getInstance()->setBolLigado(false); |
53 | 53 | InfraDebug::getInstance()->setBolDebugInfra(false); |
54 | 54 | InfraDebug::getInstance()->setBolEcho(false); |
55 | - throw new InfraException('Erro processando estatÃsticas do sistema.', $e); | |
55 | + throw new InfraException('Erro processando estatísticas do sistema.', $e); | |
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
... | ... | @@ -500,12 +500,10 @@ class MdEstatisticasColetarRN extends InfraRN |
500 | 500 | $query = ''; |
501 | 501 | if ($sgbd == 'MySql') { |
502 | 502 | $query = "SELECT year(dth_acesso) as ano, month(dth_acesso) as mes, identificacao as nome, versao, count(*) as quantidade from sei.infra_navegador where date(dth_acesso) > '%s' and date(dth_acesso) < '%s' group by 1, 2, 3, 4 order by 1,2,3,4"; |
503 | - // $query = "SELECT year(dth_acesso) as ano, month(dth_acesso) as mes, recurso, count(*) as quantidade FROM sei.infra_auditoria where date(dth_acesso) > '%s' and date(dth_acesso) < '%s' group by 1, 2, 3 order by 1, 2, 3"; | |
504 | 503 | } elseif ($sgbd == 'SqlServer') { |
505 | - $query = "SELECT year(dth_acesso) as ano, month(dth_acesso) as mes, identificacao as nome, versao, count(*) as quantidade from infra_navegador where dth_acesso > '%s' and dth_acesso < '%s' group by year(dth_acesso) as ano, month(dth_acesso) as mes, identificacao as nome, versao order by 1,2,3,4"; | |
506 | - //$query = "SELECT year(dth_acesso) as ano, month(dth_acesso) as mes, recurso, count(*) as quantidade FROM infra_auditoria where dth_acesso > '%s' and dth_acesso < '%s' group by year(dth_acesso), month(dth_acesso), recurso order by 1, 2, 3"; | |
504 | + $query = "SELECT year(dth_acesso) as ano, month(dth_acesso) as mes, identificacao as nome, versao, count(*) as quantidade from infra_navegador where dth_acesso > '%s' and dth_acesso < '%s' group by year(dth_acesso), month(dth_acesso), identificacao, versao order by 1,2,3,4"; | |
507 | 505 | } elseif ($sgbd == 'Oracle'){ |
508 | - $query = "SELECT to_char(dth_acesso, 'YYYY') AS ano, to_char(dth_acesso, 'MM') AS mes, identificacao as nome, versao, count(*) as quantidade from sei.infra_navegador WHERE dth_acesso > date '%s' AND dth_acesso < date '%s' group by to_char(dth_acesso, 'YYYY') AS ano, to_char(dth_acesso, 'MM') AS mes, identificacao as nome, versao order by to_char(dth_acesso, 'YYYY') AS ano, to_char(dth_acesso, 'MM') AS mes, identificacao as nome, versao"; | |
506 | + $query = "SELECT to_char(dth_acesso, 'YYYY') AS ano, to_char(dth_acesso, 'MM') AS mes, identificacao as nome, versao, count(*) as quantidade from sei.infra_navegador WHERE dth_acesso > date '%s' AND dth_acesso < date '%s' group by to_char(dth_acesso, 'YYYY'), to_char(dth_acesso, 'MM'), identificacao, versao order by to_char(dth_acesso, 'YYYY'), to_char(dth_acesso, 'MM'), identificacao, versao"; | |
509 | 507 | // $query = "SELECT to_char(dth_acesso, 'YYYY') AS ano, to_char(dth_acesso, 'MM') AS mes, recurso, count(*) as quantidade FROM sei.infra_auditoria WHERE dth_acesso > date '%s' AND dth_acesso < date '%s' GROUP BY to_char(dth_acesso, 'YYYY'), to_char(dth_acesso, 'MM'), recurso"; |
510 | 508 | } |
511 | 509 | $lista = array(); | ... | ... |