<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>can you try with a single value column?</p>
    <p>The array type is something that was supposed to help keeping
      keys simpler in database, but the key is concatenated with the
      index, is not really an array.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 30.08.17 20:06, George
      Diamantopoulos wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAPcKEYPRjtimNsoCLx4YzSgv_Vsv_uXybrz+HMPp_rwAOjLPjw@mail.gmail.com">
      <div dir="ltr">
        <div>Hello all, I'm becoming a regular here now, aren't I?</div>
        <div><br>
        </div>
        <div>So I have this table in mysql:</div>
        <div><span style="font-family:monospace,monospace">+----------+----------+--------+-----------+---------+<br>
            | key_name | key_type | value1 | value2 | value3 |<br>
            +----------+----------+--------+--------+--------+<br>
            | key1     | 1        | valueA | valueF | valueK |<br>
            | key1     | 1        | valueB | valueG | valueL |<br>
            | key1     | 1        | valueC | valueH | valueM |<br>
            | key2     | 1        | valueD | valueI | valueN |<br>
            | key2     | 1        | valueE | valueJ | valueO |</span></div>
        <div><span style="font-family:monospace,monospace"><br>
          </span></div>
        <div>I was hoping I could have all this information available in
          an sht, where for example:</div>
        <div>
          <pre class="gmail-programlisting">$sht(a=>$key1[0]), $sht(a=>$key1[1]), etc
</pre>
          <pre class="gmail-programlisting"><span style="font-family:arial,helvetica,sans-serif">would </span>return:
</pre>
          <pre class="gmail-programlisting">"valueA,valueF,valueK", "valueB,valueG,valueL" etc</pre>
          <pre class="gmail-programlisting"><span style="font-family:arial,helvetica,sans-serif">but I can't figure out how to setup htable to import this data on restart. I have tried various combinations of module parameters such as:

</span>modparam("htable", "htable", 'my_htable=>size=8;autoexpire=86400;dbtable=my_table;cols="key_name,<span style="font-family:monospace,monospace">value1,value2,value3</span>";'
</pre>
          <pre class="gmail-programlisting"><span style="font-family:arial,helvetica,sans-serif">I'm either getting errors, or dumping htable will only show one of the value sets (key_type is not set to array).</span>
</pre>
          <pre class="gmail-programlisting"><span style="font-family:arial,helvetica,sans-serif">Does anyone have a working config to share? Thanks!
</span></pre>
          <pre class="gmail-programlisting"><span style="font-family:arial,helvetica,sans-serif">George</span>
</pre>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>