简体   繁体   English

更新查询变量的递增值2,但应递增1 php mysql

[英]update query incrementing value of variable by 2 but should increment by 1 php mysql

mysql_query("UPDATE neuralnetwork set value= value + 1 WHERE varName='count'"); 

This query is increasing value of count by 2 when executed from php. 从php执行时,此查询会将count的值增加2。
But when the same query executed from mysql query window value is incremented by 1. 但是,当从mysql查询窗口执行的同一查询的值增加1时。

auto_increment_increment is 1. 'value' row is of type float. auto_increment_increment为1。“值”行的类型为float。

what can be the reason? 可能是什么原因?

It's not due to your query it seems OK. 这不是由于您的查询,似乎还可以。 Something is wrong in your PHP script or script loaded twice, please do benchmarking and try to find what is going wrong. 您的PHP脚本或两次加载的脚本出了点问题,请进行基准测试并尝试找出问题所在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM