la mia select, non fa altro che darmi la somma delle differenze degli orari di tutti i giorni:
Codice PHP:
SELECT
sec_to_time(sum(time_to_sec((subtime(end,begin))))) as total
FROM presences WHERE
date>='$date_from' AND
date<='$date_to' AND
customer_id='$customer_id'
ho bisgno di estrare però anche la somma parziale, quindi diventa:
Codice PHP:
SELECT
sum(subtime(end,begin)) as partial,
sec_to_time(sum(time_to_sec((subtime(end,begin))))) as total
FROM presences WHERE
date>='$date_from' AND
date<='$date_to' AND
customer_id='$customer_id'
ma ricevo un errore nell'estrazione dei dati...perchè? come faccio ad estrarre i parziali giornalieri.