W
W
WeBBeW2018-02-11 20:41:20
MySQL
WeBBeW, 2018-02-11 20:41:20

How to decrease the value in the database?

For example, a column with the name - nubmer the value of the nubmer column is 1000.
How can I subtract 10 from 1000 with mysql_query, for example?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-02-11
@WeBBeW

mysql_query('update some_table set nubmer = nubmer - 10 where nubmer = 1000')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question