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

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

WBOY
Release: 2016-06-13 12:58:42
Original
807 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template