Ver Mensaje Individual
  #4 (permalink)  
Antiguo 31/03/2010, 08:17
Hidek1
Colaborador
 
Fecha de Ingreso: octubre-2009
Ubicación: Tokyo - Japan !
Mensajes: 3.867
Antigüedad: 14 años, 6 meses
Puntos: 334
Respuesta: Restas inexactas php mysql

ajajja te iba a pedir el codigo completo ahora.. en todo caso yo hice pruebas y funcionaba todo bien :P

Código SQL:
Ver original
  1. mysql> SELECT * FROM test;
  2. +----+----------+
  3. | id | contador |
  4. +----+----------+
  5. |  1 |       11 |
  6. +----+----------+
  7. 1 ROW IN SET (0,00 sec)
  8.  
  9. mysql> UPDATE test SET contador = contador - 10 WHERE id = 1;
  10. Query OK, 1 ROW affected (0,00 sec)
  11. ROWS matched: 1  Changed: 1  Warnings: 0
  12.  
  13. mysql> SELECT * FROM test;
  14. +----+----------+
  15. | id | contador |
  16. +----+----------+
  17. |  1 |        1 |
  18. +----+----------+
  19. 1 ROW IN SET (0,00 sec)

saludos!
__________________
More about me...
~ @rhyudek1
~ Github