开发者

Add numbers within mysql column

开发者 https://www.devze.com 2023-01-30 07:36 出处:网络
I have a php script that I\'m using to rank football teams. Basically, every time you click on the picture of a football team, the data is input into a mysql database. I have a column for the number o

I have a php script that I'm using to rank football teams. Basically, every time you click on the picture of a football team, the data is input into a mysql database. I have a column for the number of times the football team has been selecte开发者_高级运维d. How do I add 1 to the number in that column every time the football team is clicked, from within the php. Right now I am using an UPDATE command, but I can't get it to work. Thanks for suggestions


 UPDATE click_table SET clicks = clicks + 1 WHERE team = <team>;
0

精彩评论

暂无评论...
验证码 换一张
取 消