Jump to content

POWERED BY:

Search the Community

Showing results for tags 'between'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Q&A Desenvolvimento
    • Perguntas e respostas rápidas
  • Web Development
    • HTML e CSS
    • Javascript
    • PHP
    • Ruby
    • Python
    • Java
    • .NET
    • Docker, Kubernets and other environments
    • WordPress
    • Mobile
    • Agile
    • Desenvolvimento de Games
    • Banco de Dados
    • Design and UX
    • Algoritmos & Outras Tecnologias
  • Entretenimento e uso pessoal
    • Segurança & Malwares
    • Geral
    • iMasters's pub

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Google+


Hangouts


Skype


Twitter


deviantART


Github


Flickr


LinkedIn


Pinterest


Facebook


Site Pessoal


Localização


Interesses

Found 1 result

  1. Estou com problema para resolver uma solução que estou necessitando. Toda ajuda será bem-vinda! Tenho uma tabela onde há vários registros com um mesmo IDENTIFICADOR e vários INDENTIFICADORES diferentes em uma mesma coluna. Como percorrer os registros de uma tabela, com base nos IDENTIFICADORES? Preciso também analisar um período por data (>= e <=) e ABSTRAIR deste período o valor MIN e MAX de uma outra coluna Esta consulta precisa ser realizada em cada IDENTIFICADOR DISTINTO? Já utilizei o BETWEEN, mas ao usar o código com o foreach() no PHP ele lê apenas um registro. O código que estou trabalhando é este: SELECT conf_hidro_inatividade, cons_reg_ident_iot, cons_data, MIN(cons_leitura_atual), MAX(cons_leitura_atual), hidro_valvula, hidro_cliente FROM tab_conf_hidro, tab_consumo INNER JOIN tab_hidrometros ON cons_reg_ident_iot = hidro_ident_iot WHERE cons_reg_ident_iot = '20220701001' and conf_hidro_inatividade = 'sim' and hidro_valvula = 'aberta' and cons_data BETWEEN '2022-10-10' and '2022-10-13'; Com: SELECT conf_hidro_inatividade, cons_reg_ident_iot, cons_data, cons_leitura_atual, hidro_valvula, hidro_cliente /*(sem o MIN e MAX na mesma coluna)*/ WHERE cons_reg_ident_iot != ' ' and conf_hidro_inatividade = 'sim' and hidro_valvula = 'aberta'; usando dentro do foreach(), percorre todos os registros.
×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.