<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ~~~ $redis->muti($mode) ->get($key) ->set($key) ->exec(); ~~~ 既然是這樣的, 當我要使用管道執行一萬次操作的時候,需要寫一萬次操作在muti()的后面,有沒有更好的寫法? 設計者沒有想到這個問題么? ~~~ <?php $redis = new Redis(); $redis->connect('10.1.132.86', 6379); $pipe = $redis->multi(Redis::PIPELINE); for ($i = 0; $i < 10000; $i++) { $pipe->set("key::$i", str_pad($i, 4, '0', 0)); $pipe->get("key::$i"); } $replies = $pipe->exec(); echo " "; print_r($replies); ~~~ 今天測試成功了 * * * * * #### Description: Enter and exit transactional mode. #### Parameters (optional) Redis::MULTI or Redis::PIPELINE. Defaults toRedis::MULTI. A Redis::MULTI block of commands runs as a single transaction; aRedis::PIPELINE block is simply transmitted faster to the server, but without any guarantee of atomicity.discard cancels a transaction. #### Return value multi() returns the Redis instance and enters multi-mode. Once in multi-mode, all subsequent method calls return the same object untilexec() is called. #### Example ~~~ $ret = $redis->multi() ->set('key1', 'val1') ->get('key1') ->set('key2', 'val2') ->get('key2') ->exec(); /* $ret == array( 0 => TRUE, 1 => 'val1', 2 => TRUE, 3 => 'val2'); */ ~~~ > mget也可以實現簡單數據多條記錄的讀取 #### mGet, getMultiple Description: Get the values of all the specified keys. If one or more keys dont exist, the array will contain FALSE at the position of the key. #### Parameters Array: Array containing the list of the keys #### Return value Array: Array containing the values related to keys in argument Examples ~~~ <?php $redis->set('key1', 'value1'); $redis->set('key2', 'value2'); $redis->set('key3', 'value3'); # $redis->mSet(array('key1' => 'value1', 'key2 => 'value2', 'key3 => 'value3')); $redis->mGet(array('key1', 'key2', 'key3')); /* array('value1', 'value2', 'value3'); $redis->mGet(array('key0', 'key1', 'key5')); /* array(`FALSE`, 'value2', `FALSE`); ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看