<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Yes, I know :-) We also use avpops for everything, and I still don't
quite get the logic behind avpops...<br>
Avpops will not likely disappear in the future; we know people used it
for 0.9 (out of lack of something better). And if somebody using it
wants to step forward and maintain it, I don't see why not. <br>
<br>
Selects is not really that hard to understand, it is just a notation
where a SIP message is seen as C/C++ struct called @ and where each
header is the key. In addition, there are selects that can give you
access to stuff not found in the SIP message, but that you cannot
change.<br>
What is missing is a good reference so you can quickly look up the
select you need. As you may have seen, there is a project ongoing that
will create a searchable documentation tool...<br>
g-)<br>
<br>
sip wrote:
<blockquote cite="mid20070413005554.M77099@infinideas.com" type="cite">
  <meta content="text/html; charset=iso-8859-1"
 http-equiv="Content-Type">
  <meta content="OPENWEBMAIL" name="GENERATOR">
  <font size="2">You know, Greger... it's statements like that that
absolutely terrify me away from trying to migrate our production setup
to the new SER. :) <br>
  <br>
We use avpops for just about EVERYthing. :)&nbsp; And I still don't
understand the selects, though I've looked at them. <br>
  <br>
Daunting, I tell you. <br>
  <br>
N. <br>
  </font><font size="2"><b><br>
On Thu, 12 Apr 2007 21:09:59 +0200, Greger V. Teigre wrote</b>
  <br>
&gt; Note that avpops is deprecated in upcoming SER 2.0&nbsp; (still
present, but
not maintained). Selects, avps and a couple of more powerful modules
take over.
  <br>
&gt; See docs:
  <br>
&gt; <a href="http://www.iptel.org/ser/doc/modules/avpops"
 class="moz-txt-link-freetext">http://www.iptel.org/ser/doc/modules/avpops</a>
  <br>
&gt; You need an attribute column defined (in your dbscheme), which
should
be identified in the second param to avp_db_delete.
  <br>
&gt; g-)
  <br>
&gt; <br>
&gt; chungyu wrote:
  <blockquote type="cite"
 cite="http://www.arcdiv.com/cgi-bin/owm/mid002201c77c47$b5ca6150$211016a3@nctu">
<!-- style 
begin

style end 
--> <br>
&gt; <font size="2">Dear all:
    <br>
&gt; &nbsp;avpops module' exported function avp_db_delete() can do delete
one
record?</font> <br>
&gt; &nbsp; <br>
&gt; <font size="2">example:
    <br>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I use "test" as default table that has two fields.</font>
    <br>
&gt; &nbsp; <br>
&gt; <font size="2">username |&nbsp; number
    <br>
&gt; -------------------
    <br>
&gt; bob&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; 1
    <br>
&gt; alice&nbsp;&nbsp;&nbsp; |&nbsp; 1
    <br>
&gt; bob&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; 2</font> <br>
&gt; &nbsp; <br>
&gt; <font size="2">my configuration:
    <br>
&gt; modparam("avpops", "avp_url", "mysql://ser:heslo@localhost/ser")
    <br>
&gt; modparam("avpops", "avp_table", "test")
    <br>
&gt; modparam("avpops", "username_column", "username")
    <br>
&gt; modparam("avpops", "avp_aliases", "num=i:55")
    <br>
&gt; modparam("avpops", "db_scheme",
"number_scheme:table=test;value_col=number;value_type=string")</font> <br>
&gt; &nbsp; <br>
&gt; <font size="2">if (method=="INVITE"){
    <br>
&gt; &nbsp;&nbsp; avp_db_load("$from/username", "$num/$number_scheme");&nbsp;&nbsp; //load
from
table "test" ,number column as string value into AVP name '$num'
    <br>
&gt; &nbsp;&nbsp; avp_db_delete("$from/username", "s:test")&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //delete all
bob'
record
    <br>
&gt; };</font> <br>
&gt; &nbsp; <br>
&gt; <font size="2">if bob calling then bob'record has deleted</font> <br>
&gt; &nbsp; <br>
&gt; <font size="2">username&nbsp; |&nbsp; number
    <br>
&gt; --------------------
    <br>
&gt; alice&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; 1</font> <br>
&gt; &nbsp; <br>
&gt; <font size="2">But i want delete a record.
    <br>
&gt; ex: delete number value is 1 for bob</font> <br>
&gt; &nbsp; <br>
&gt; <font size="2">username&nbsp; |&nbsp; number
    <br>
&gt; --------------------
    <br>
&gt; alice&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; 1
    <br>
&gt; ---------------------
    <br>
&gt; bob&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; 2 </font> <br>
&gt; &nbsp; <br>
&gt; <font size="2">avp_db_delete() can do delete one record? </font>
    <br>
&gt; &nbsp; <br>
&gt; <font size="2">Another question is avp_db_store() can do insert
new data in table?</font> <br>
&gt; &nbsp; <br>
&gt; <font size="2">ex:&nbsp; insert into test (username,number) values
("mary","3")</font> <br>
&gt; &nbsp; <br>
&gt; <font size="2">username&nbsp; |&nbsp; number
    <br>
&gt; -------------------
    <br>
&gt; alice&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; 1
    <br>
&gt; -------------------
    <br>
&gt; bob&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; 2
    <br>
&gt; -------------------
    <br>
&gt; mary&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; 3</font> <br>
&gt; &nbsp; <br>
&gt; <font size="2">avp_db_store() can do it?</font> <br>
&gt; &nbsp; <br>
&gt; <font size="2">sorry,I still can't understand what it mean about
avp_db_store() and avp_db_delete().
    <br>
&gt; Can tell me?
    <br>
&gt; Thanks a lot in advance</font> <br>
&gt; &nbsp; <br>
&gt; <font size="2">Chungyu </font> <br>
&gt; &nbsp; <br>
&gt;
    <pre wrap=""><hr size="4" width="90%">
_______________________________________________
Serusers mailing 
list
<a href="mailto:Serusers@lists.iptel.org"
 class="moz-txt-link-abbreviated">Serusers@lists.iptel.org</a>
<a href="http://lists.iptel.org/mailman/listinfo/serusers"
 class="moz-txt-link-freetext">http://lists.iptel.org/mailman/listinfo/serusers</a>
  
    </pre>
  </blockquote>
  <br>
  <br>
  <br>
  </font>
</blockquote>
</body>
</html>