I have this in php mysql
$fechaactual = Date("Y-m-d");
tep_db_query(
"UPDATE "
. TABLE_ENTREGAS
. " SET fecha_calidad = DATE_ADD('"
. tep_db_input($fechaactual)
. "', INTERVAL 3 DAY) WHERE numero_contrato = '"
. $contrato['numero_contrato']
. "'"
);
and I need that if it's Thursday, add 1 more day to the 3 days of the programmed interval
and if it is Friday add 2 more days to the 3 days of the programmed interval set in fecha_calidad
.
that is, if Thursday is day 08/03/2018 when doing the update on Thursday the quality_date should be 1 day + 3 days of the interval = 4 days in fecha_calidad
that is to say if Friday is day 09/03/2018 when doing the update on Friday the date_quality should be 2 days (Saturday and Sunday) + 3 days of the interval = 5 days in fecha_calidad
as would be the query to recognize the sum of 4 days if it is Thursday how would the query be for recognizing the sum of 5 days if it is Friday
In conclusion, you should never make a update
to fecha_calidad
on Saturday or Sunday.