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

Popular posts from this blog

java - Could not locate OpenAL library -

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

sorting - opencl Bitonic sort with 64 bits keys -