redis get 报错:WRONGTYPE
本帖最后由 cxytz01 于 2013-12-03 21:07 编辑127.0.0.1:6369> get user_id
(error) WRONGTYPE Operation against a key holding the wrong kind of value
127.0.0.1:6369> sort user_id alpha
1) "1"
2) "2"
3) "222"
4) "59230"
只要是list都会报错
lpush a "www.xxx.com"
get a
(error) WRONGTYPE Operation against a key holding the wrong kind of value
sort a
(error) WRONGTYPE Operation against a key holding the wrong kind of value
sort a alpha
就可以了
或者sort a by xxxx(不存在的key)
也可以
知道了。get仅能用于string,和int数据类型。 终于看到一个解决问题之后来回帖的了,赞一个{:qq11:}
页:
[1]