<div dir="ltr"><div>Hello Daniel!<br></div><div><br></div><div>Yes, it seems to be working with single value column. I'll create a view in the database if I need all values available for each key. Thanks!</div><div><br></div><div>BR,</div><div>George<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 30 August 2017 at 22:04, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div 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><div><div class="m_-8947188033302238721h5">
    <br>
    <div class="m_-8947188033302238721m_9155963093155753570moz-cite-prefix">On 30.08.17 20:06, George
      Diamantopoulos wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="m_-8947188033302238721h5">
      <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">+----------+----------+-------<wbr>-+-----------+---------+<br>
            | key_name | key_type | value1 | value2 | value3 |<br>
            +----------+----------+-------<wbr>-+--------+--------+<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="m_-8947188033302238721m_9155963093155753570gmail-programlisting">$sht(a=>$key1[0]), $sht(a=>$key1[1]), etc
</pre>
          <pre class="m_-8947188033302238721m_9155963093155753570gmail-programlisting"><span style="font-family:arial,helvetica,sans-serif">would </span>return:
</pre>
          <pre class="m_-8947188033302238721m_9155963093155753570gmail-programlisting">"valueA,valueF,valueK", "valueB,valueG,valueL" etc</pre>
          <pre class="m_-8947188033302238721m_9155963093155753570gmail-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=<wbr>86400;dbtable=my_table;cols="k<wbr>ey_name,<span style="font-family:monospace,monospace">value1,value2,value3</span>";<wbr>'
</pre>
          <pre class="m_-8947188033302238721m_9155963093155753570gmail-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="m_-8947188033302238721m_9155963093155753570gmail-programlisting"><span style="font-family:arial,helvetica,sans-serif">Does anyone have a working config to share? Thanks!
</span></pre>
          <pre class="m_-8947188033302238721m_9155963093155753570gmail-programlisting"><span style="font-family:arial,helvetica,sans-serif">George</span>
</pre>
        </div>
      </div>
      <br>
      <fieldset class="m_-8947188033302238721m_9155963093155753570mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
Kamailio (SER) - Users Mailing List
<a class="m_-8947188033302238721m_9155963093155753570moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="m_-8947188033302238721m_9155963093155753570moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><span class="m_-8947188033302238721HOEnZb"><font color="#888888">
</font></span></pre><span class="m_-8947188033302238721HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="m_-8947188033302238721HOEnZb"><font color="#888888">
    <br>
    <pre class="m_-8947188033302238721m_9155963093155753570moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="m_-8947188033302238721m_9155963093155753570moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_-8947188033302238721m_9155963093155753570moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="m_-8947188033302238721m_9155963093155753570moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
Kamailio World Conference - <a class="m_-8947188033302238721m_9155963093155753570moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
  </font></span></div>

</blockquote></div><br></div></div>