hello,<br>
I tried following<br>
if (is_method(&quot;INVITET&quot;))<br>
    {<br>
    avp_db_query(&quot;select count from load_count where dest=&#39;1&#39;&quot;,&quot;$avp(i:1)&quot;);<br>
    avp_db_query(&quot;select count from load_count where dest=&#39;2&#39;&quot;,&quot;$avp(i:2)&quot;);<br>
    if ($(avp(i:1){<a href="http://s.int">s.int</a>})&lt;$(avp(i:2){<a href="http://s.int">s.int</a>})<br>
    {<br>
        #$avp(i:3)=1+(avp(i:1){<a href="http://s.int">s.int</a>};<br>
        #avp_db_query(&quot;update load_count set count=&#39;$(avp(i:3)&#39; where dest=&#39;1&#39;;&quot;);<br>
        avp_op(&quot;$avp(i:1)&quot;, &quot;add/1/g&quot;);<br>
        forward(&quot;<a href="http://172.29.9.140:5060">172.29.9.140:5060</a>&quot;);<br>
        exit;<br>
    }<br>
    else<br>
    {    #$avp(i:3)=1+(avp(i:2){<a href="http://s.int">s.int</a>};<br>
        #avp_db_query(&quot;update load_count set count=&#39;$(avp(i:3)&#39; where dest=&#39;2&#39;;&quot;);<br>
        avp_op(&quot;$avp(i:2)&quot;, &quot;add/1/g&quot;);<br>
        forward(&quot;<a href="http://172.29.9.131:5060">172.29.9.131:5060</a>&quot;);<br>
        exit;<br>
    }<br>
        <br>
    }<br>
<br>
I think there is problem in update query<br>
How to add count?<br>
please help<br>
thank you<br><br><br>