Posts by user61898 • 1 point
1 post
-
0
votes0
answers37
viewsQ: I have a super extensive query when I try to insert into the database does not work, I don’t know why
$result = $db->query(" SELECT RES.morada, RES.espaco, SUM(DATEDIFF(RES.data_fim, RES.data_inicio)*RES.tarifa) AS pago FROM ( SELECT A.morada AS morada, A.codigo AS espaco,…