<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hello,<br>
      <br>
      The avp_db_query() stores the DB result (multiple rows with
      multiple columns) into a set of AVPs (kind of an array). See <br>
         
      <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.2.x/avpops.html#id293973">http://www.opensips.org/html/docs/modules/2.2.x/avpops.html#id293973</a><br>
      <br>
      Using a while loop (see
      <a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Script-Statements-2-2#toc3">http://www.opensips.org/Documentation/Script-Statements-2-2#toc3</a>),
      you can iterate throw all the rows, by checking the if
      $(avp(xxx)[$var(idx)]) is NULL or not (where </tt><tt><tt>$var(idx)
        is the variable in the while loop).<br>
        <br>
        Inside the loop, simply store the row (all the AVPs with that
        index) into cache DB .<br>
        <br>
      </tt>Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 18.09.2016 12:15, xiaofeng wrote:<br>
    </div>
    <blockquote
cite="mid:CAPE2etvaxTdsYr6sgLTYVJV-X7KYisQ7-9UJD5=VQXrQz8FLUg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi there,
        <div><br>
        </div>
        <div>I want to save several avp_db_query-values to one attribute
          use cache_store at startup, how to do that?</div>
        <div><br>
        </div>
        <div>Thanks.<br clear="all">
          <div><br>
          </div>
          -- <br>
          <div class="gmail_signature" data-smartmail="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>
                    <div dir="ltr">
                      <div><span><font color="#888888">xiaofeng<br>
                            <br>
                            --<br>
                            gpg key fingerprint:<br>
                            2048R/5E63005B<br>
                            C84F 671F 70B7 7330 4726  5EC8 02BC CBA2
                            5E63 005B</font></span><br>
                        <span><font color="#888888">--</font></span><br>
                        <span><font color="#888888">trans-zh_cn mailing
                            list<br>
                            <a moz-do-not-send="true"
                              href="mailto:trans-zh_cn@lists.fedoraproject.org"
                              target="_blank">trans-zh_cn@lists.fedoraproject.org</a><br>
                            <a moz-do-not-send="true"
                              href="https://admin.fedoraproject.org/mailman/listinfo/trans-zh_cn"
                              target="_blank">https://admin.fedoraproject.org/mailman/listinfo/trans-zh_cn</a></font></span></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>