<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=big5">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Dear all:<BR> Avpops module' exported function
avp_db_delete() can do delete one record?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT
size=2>example:<BR>
I use "test" as default table that has two fields.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>username |
number<BR>-------------------<BR>bob |
1<BR>alice | 1<BR>bob
| 2</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>my configuration:<BR>modparam("avpops", "avp_url",
"mysql://ser:heslo@localhost/ser")<BR>modparam("avpops", "avp_table",
"test")<BR>modparam("avpops", "username_column",
"username")<BR>modparam("avpops", "avp_aliases",
"num=i:55")<BR>modparam("avpops", "db_scheme",
"number_scheme:table=test;value_col=number;value_type=string")</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>if (method=="INVITE"){<BR>
avp_db_load("$from/username", "$num/$number_scheme"); //load from
table "test" ,number column as string value into AVP name '$num'<BR>
avp_db_delete("$from/username", "s:test") //delete
all bob' record<BR>};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>if bob calling then bob'record has deleted</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>username |
number<BR>--------------------<BR>alice |
1</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>But i want delete a record.<BR>ex: delete number value is 1
for bob</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>username |
number<BR>--------------------<BR>alice |
1<BR>---------------------<BR>bob
| 2 </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>avp_db_delete() can do delete one record? </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Another question is avp_db_store() can do insert new data in
table?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>ex: insert into test (username,number) values
("mary","3")</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>username |
number<BR>-------------------<BR>alice
|
1<BR>-------------------<BR>bob
|
2<BR>-------------------<BR>mary
| 3</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>avp_db_store() can do it?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>sorry,I still can't understand what it mean about
avp_db_store() and avp_db_delete().<BR>Can tell me?<BR>Thanks a lot in
advance</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Chungyu </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>
</FONT></DIV></BODY></HTML>