Hello Daniel!
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!
BR,
George
On 30 August 2017 at 22:04, Daniel-Constantin Mierla <miconda(a)gmail.com>
wrote:
Hello,
can you try with a single value column?
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.
Cheers,
Daniel
On 30.08.17 20:06, George Diamantopoulos wrote:
Hello all, I'm becoming a regular here now, aren't I?
So I have this table in mysql:
+----------+----------+--------+-----------+---------+
| key_name | key_type | value1 | value2 | value3 |
+----------+----------+--------+--------+--------+
| key1 | 1 | valueA | valueF | valueK |
| key1 | 1 | valueB | valueG | valueL |
| key1 | 1 | valueC | valueH | valueM |
| key2 | 1 | valueD | valueI | valueN |
| key2 | 1 | valueE | valueJ | valueO |
I was hoping I could have all this information available in an sht, where
for example:
$sht(a=>$key1[0]), $sht(a=>$key1[1]), etc
would return:
"valueA,valueF,valueK", "valueB,valueG,valueL" etc
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:
modparam("htable", "htable",
'my_htable=>size=8;autoexpire=86400;dbtable=my_table;cols="key_name,value1,value2,value3";'
I'm either getting errors, or dumping htable will only show one of the value sets
(key_type is not set to array).
Does anyone have a working config to share? Thanks!
George
_______________________________________________
Kamailio (SER) - Users Mailing
Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin
Mierlawww.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio Advanced Training -
www.asipto.com
Kamailio World Conference -
www.kamailioworld.com