Tema: Totalizar
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/11/2019, 07:51
Parliament
 
Fecha de Ingreso: noviembre-2003
Mensajes: 499
Antigüedad: 20 años, 5 meses
Puntos: 7
Totalizar

Hola amigos, tengo esta consulta, y necesito totalizar, por ejemplo
habit.`single`*1
,habit.`doble`*2
,habit.`triple`*3
,habit.`cuadr`*4
,habit.`dpto2`*2
, habit.`dpto3`*3
, habit.`dpto4`*4
, habit.`dpto5`*5
, habit.`dpto6`*6
,habit.`dpto7`*7
,habit.dpto8,*8
habit.dpto9,*9
habit.suite,*2 t guardar el total de esto en totpla
Alguin me ayuda ???
Código PHP:
SELECT estab.nest,estab.localidad,estab.clase,estab.`categoria`, habit.`single`,habit.`doble`,habit.`triple`,habit.`cuadr`,habit.`dpto2`, habit.`dpto3`, habit.`dpto4`, habit.`dpto5`, habit.`dpto6`,habit.`dpto7`,habit.dpto8habit.dpto9habit.suitehabit.`totplaFROM estab INNER JOIN habit ON estab.nr habit.nr where nleg LIKE '%19' and conre=10