$query=mysql_query("SELECT stock FROM tienda WHERE producto_id=$producto_id");
my_query("UPDATE tienda SET stock=stock$cantidad WHERE product_id=$producto_id");
Note: what I want my program to do is to be able to consult the database and then update it by subtracting a field from a table with a predefined data, that is, for example: I have a table called usuarios
, and of fields has dinero
and nombre_de_cliente
; dinero=dinero-108;