Home  >  Article  >  Backend Development  >  redis ERR value is not an integer or out of range

redis ERR value is not an integer or out of range

WBOY
WBOYOriginal
2016-06-06 20:25:465057browse

<code class="php">$fee = 0.01;
$redis->incrby('num',$fee);
//ERR value is not an integer or out of range incrby不能用浮点数,除了*100转换还有办法吗?</code>

回复内容:

<code class="php">$fee = 0.01;
$redis->incrby('num',$fee);
//ERR value is not an integer or out of range incrby不能用浮点数,除了*100转换还有办法吗?</code>

不是很清楚了吗.第二个参数要是int类型的

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