php - How copy element of sorted set to other sorted set? -
there 2 sorted sets
in redis store scores (timestamp). how can copy 1 element sorted set
, insert other?
i think should as:
$time = time(); $key = 'set1'; $key2 = 'set2'; $data = $redis->zrangebyscore($key, $time, $time); // 1 element score timestamp $redis->zadd($key2, $time, $data);
Comments
Post a Comment