1
I need to register commemorative dates in the database, but I only need the day and month, the year is not relevant and does not need to be registered.
My question is this, I can only save the day and the month in the field Date do MYSQL? or better save in text field? And then recover with function date do php, 'cause I’m gonna need to do a function to calculate that the date is close when it’s only five days away.
Example:
<label>Nome Data:
<input type="text" name="data_comemorativa"/>
</label>
<br><br>
<label>Data:
<input type="text" placeholder="dia / mês" name="data"/>
</label>
<br><br>
<button name="Salvar">Salvar</button>
<!--
Depois em php farei a busca no banco todos os dias e farei um alerta para quando estiver faltando apenas 5 dias para o evento e alertado até o dia do evento
"falta 5 dias para...."
"falta 4 dias para ..."
"até o dia do evento"
para o calculo em php vou pegar o ano atual mais o dia e mes vindo do banco.
-->
Or better save the day and month with the current year?
Perfect @Isac, I was wondering if you would do it anyway.
– WMomesso