memberReturn value: Character type dataInstance 225,zunionDescription: The keys corresponding to the Numkeys ordered set to compute the collection and store the results in destinationParameters: KeyOutput Arrayzsetkeys arrayweights aggregatefunctionReturn value: An array of sets ofInstance 226,zinterDescription: The keys corresponding to the Numkeys ordered set compute the intersection and store the results in the destinationParameters: KeyOutput Arrayzsetkeys arrayweights aggregatefunctionRetu
' LOL '$newValue = $redis->get (' x ') '//return ' LOL 'AppendString, the value of string with the name key appended with value$redis->set (' key ', ' value1 ');$redis->append (' key ', ' value2 ');$redis->get (' key ');GetRange (method does not exist)Returns the character between start and end in a string named key$
), which is the basis for sorting.
Most of the time, we call the ordered set in the Redis as Zsets, because in Redis, the instructions for an ordered set are all started with Z, such as Zrange, Zadd, Zrevrange, Zrangebyscore, and so on.
As usual, let's take a look at some vivid examples:Add an ordered set of Myzset and add an element baidu.com, giving it an ord
', ' value2 ');$redis-gt;get (' key ');GetRange(method does not exist)Returns a name calledKeyThe stringInStartToEndBetween the characters$redis-gt;set (' key ', ' string value ');$redis-gt;getrange (' key ', 0, 5);$redis-gt;getrange (' key ',-5,-1);SetRange(method does not exist)ChangeKeyThe stringInStartToEndThe cha
(' key ');
GetRange (method does not exist)
Returns the character between start and end in a string named key
$redis->set (' key ', ' string value '), $redis->getrange (' key ', 0, 5), $redis->getrange (' key ',-5,-1);
SetRange (method does not exist)
The character between start and end in a string that changes key is value
$
= $ redis-> getSet ('X', 'Lol '); // return '42', replaces x by 'Lol'$ NewValue = $ redis-> get ('x') '// return 'Lol'AppendString, the value of the string with the name of key is appended with value$ Redis-> set ('key', 'value1 ');$ Redis-> append ('key', 'value2 ');$ Redis
; getSet ('X', 'Lol '); // return '42', replaces x by 'Lol'$ NewValue = $ redis-> get ('x') '// return 'Lol'AppendString, the value of the string with the name of key is appended with value$ Redis-> set ('key', 'value1 ');$ Redis-> append ('key', 'value2 ');$ Redis-> get ('key ');GetRange (method does not exist)Returns
;getset (' x ', ' lol '); Return ' A ', replaces x by ' LOL '$newValue = $redis->get (' x ') '//return ' LOL ' AppendString, the value of string with the name key appended with value$redis->set (' key ', ' value1 ');$redis->append (' key ', ' value2 ');$redis->get (' key '); GetRange (method does not exist)Returns the
', replaces x by ' LOL '$newValue = $redis->get (' x ') '//return ' LOL 'AppendString, the value of string with the name key appended with value$redis->set (' key ', ' value1 ');$redis->append (' key ', ' value2 ');$redis->get (' key ');GetRange (method does not exist)Returns the character between start and end in a s
' LOL ' AppendString, the value of string with the name key appended with value$redis->set (' key ', ' value1 ');$redis->append (' key ', ' value2 ');$redis->get (' key '); GetRange (method does not exist)Returns the character between start and end in a string named key$redis->set (' key ', ' string value ');$
of string with the name key appended with value$redis->set (' key ', ' value1 ');$redis->append (' key ', ' value2 ');$redis->get (' key ');GetRange (method does not exist)Returns the character between start and end in a string named key$redis->set (' key ', ' string value ');$red
of string with the name key appended with value$redis->set (' key ', ' value1 ');$redis->append (' key ', ' value2 ');$redis->get (' key ');GetRange (method does not exist)Returns the character between start and end in a string named key$redis->set (' key ', ' string value ');$red
' LOL 'AppendString, the value of string with the name key appended with value$redis->set (' key ', ' value1 ');$redis->append (' key ', ' value2 ');$redis->get (' key ');GetRange (method does not exist)Returns the character between start and end in a string named key$redis->set (' key ', ' string value ');$
', replaces x by ' LOL '$newValue = $redis->get (' x ') '//return ' LOL ' AppendString, the value of string with the name key appended with value$redis->set (' key ', ' value1 ');$redis->append (' key ', ' value2 ');$redis->get (' key '); GetRange (method does not exist)Returns the character between start and end in
;getset (' x ', ' lol '); Return ' A ', replaces x by ' LOL '$newValue = $redis->get (' x ') '//return ' LOL 'AppendString, the value of string with the name key appended with value$redis->set (' key ', ' value1 ');$redis->append (' key ', ' value2 ');$redis->get (' key ');GetRange (method does not exist)Returns the ch
');GetRange (method does not exist)Returns the character between start and end in a string named key$redis->set (' key ', ' string value ');$redis->getrange (' key ', 0, 5);$redis->getrange (' key ',-5,-1);SetRange (method does not exist)The character between start and end in a string that changes key is value$redis->
;setrange (' key ', 6, "Redis");$redis-gt;get (' key ');StrlenThe length of the string that gets the key$redis-gt;strlen (' key ');Getbit/setbitReturns 2 Feed informationZset (sorted set) operations relatedZadd (key, Score, member): Adds element Member,score to the zset named key for sorting. If the element already exists, the order of the elements is updated acc
of string with the name key appended with value$redis->set (' key ', ' value1 ');$redis->append (' key ', ' value2 ');$redis->get (' key ');GetRange (method does not exist)Returns the character between start and end in a string named key$redis->set (' key ', ' string value ');$red
number, return True, repeat return false $redis->zadd (' zset1′,1, ' ab ');
$redis->zadd (' zset1′,2, ' CD ');
$redis->zadd (' zset1′,3, ' ef '); Zincrby the increment or decrease of the index value of the specified element, cha
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.