2
I need to create a PHP application that reads the date of a column inside the MYSQL database and compare with today’s date, after comparing it should print the difference of days.
Example: In the bank contains the following date:2017-08-31, in the column 'dates'. As today is day 2017-09-28, he would have to return me 29 days.
This AS DIFERENCA_DIAS, what would it be? I don’t understand.
– Geraldão de Rívia
It is an ALIAS for the name of the field that will contain the number 29, according to your example. Ai you call in PHP the result value as $difca = $S['DIFERENCA_DIAS']; https://www.w3schools.com/sql/sql_alias.asp
– Wilson Faustino
I did it your way and it worked perfectly, thank you very much!
– Geraldão de Rívia