MySQL Forums
Forum List  »  Portuguese

Data atual
Posted by: Jozeph Jozeph
Date: February 10, 2025 11:16PM

Ola boa noite, gostaria de uma ajuda por favor:
tenho uma consulta que me retorna os dados de meu banco do dia atual, então preciso que outra linha me retorne os dados do mês atual e em outra linha de código me retorne os dados do ano atual.

$query1="SELECT SUM(dados_da_coluna) AS dia FROM logs where data-da-coluna = CURDATE()";

Options: ReplyQuote


Subject
Views
Written By
Posted
Data atual
48
February 10, 2025 11:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.