Home  >  Article  >  Backend Development  >  如何让两个字段的值增加1,语句该如何写啊

如何让两个字段的值增加1,语句该如何写啊

WBOY
WBOYOriginal
2016-06-13 12:58:42756browse

求助:怎么让两个字段的值增加1,语句该怎么写啊?
一个语句就可以完成的?
------解决方案--------------------
php?
$a++;$b++;
mysql:
"update xxx set v=v+1, x=x+1;"
------解决方案--------------------
update tt set 字段1=字段1+1,字段2=字段2+1; 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn