<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=x-gbk" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
please keep the mailing list cc-ed all the time.<br>
<br>
Thanks,<br>
Daniel<br>
<br>
On 1/20/11 1:49 PM, ºîÐñ¹â wrote:
<blockquote
cite="mid:75c9e69.13d97.12da378df00.Coremail.marquis_hxg@126.com"
type="cite">many thanks
<div>I've fixed the <a moz-do-not-send="true"
href="http://problem.Your" target="_blank">problem.</a></div>
<div>Using $(avp(s:name)) instead of $avp(s:name) </div>
<div><a moz-do-not-send="true" href="http://problem.your/"
target="_blank">Your</a> solution is OK too.<br>
<br>
At 2011-01-20
18:10:40£¬"Daniel-Constantin Mierla" <a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com"><miconda@gmail.com></a>
wrote:<br>
<blockquote id="isReplyContent" style="padding-left: 1ex;
margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204,
204, 204);"> Hello,<br>
<br>
maybe is better to use sqlops module, it more suitable for
queries with many records in result.<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://kamailio.org/docs/modules/stable/modules_k/sqlops.html">http://kamailio.org/docs/modules/stable/modules_k/sqlops.html</a><br>
<br>
Cheers,<br>
Daniel<br>
<br>
On 1/19/11 2:58 PM, Klaus Darilion wrote:
<blockquote cite="mid:4D36EE0A.7070406@pernau.at" type="cite">looks
fine. try to increase debug level - then you should see the
query and the results in syslog <br>
<br>
regards <br>
klaus <br>
<br>
Am 18.01.2011 12:07, schrieb ºîÐñ¹â: <br>
<blockquote type="cite">Hello <br>
<br>
<br>
|avp_db_query(query[,dest]) can get a database query
and store the <br>
results in the avps.| <br>
<br>
<br>
|But what if the results returns many rows,and how
can I get all <br>
the results? How to set the [dest] parameter ?| <br>
<br>
<br>
|I've tried the method describered in <br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.kamailio.org/docs/avp_db_query.html,but">http://www.kamailio.org/docs/avp_db_query.html,but</a>
it doesn't work.| <br>
<br>
<br>
|like below| <br>
<br>
<br>
|mysql<select mem_user from tgroup where
grp_name='1234';| <br>
<br>
<br>
|+----------+| <br>
<br>
<br>
|| mem_user || <br>
<br>
<br>
|+----------+| <br>
<br>
<br>
|| 1013 || <br>
<br>
<br>
|| 2013 || <br>
<br>
<br>
|+----------+| <br>
<br>
<br>
|2 rows in set (0.00 sec)| <br>
<br>
<br>
|kamailio.cfg| <br>
<br>
<br>
|if(avp_db_query("select mem_user from tgroup where
<br>
grp_name='1234'","$avp(name)"))| <br>
<br>
<br>
|{| <br>
<br>
<br>
|||xlog("L_INFO","query results[1]
:$avp(name[1])\n");| <br>
<br>
<br>
|xlog("L_INFO","query results[2]
:$avp(name[2])\n");| <br>
<br>
<br>
|}| <br>
<br>
<br>
|syslog| <br>
<br>
<br>
|<INFO> query results[1] :<null>| <br>
<br>
<br>
|<INFO> query results[2] :<null>| <br>
<br>
<br>
|version: kamailio 3.0.2 MySQL 5.0| <br>
<br>
<br>
|| <br>
<br>
<br>
|thank you very much!| <br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________ <br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
mailing list <br>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
<br>
</blockquote>
<br>
<pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Jan 24-26, 2011, Irvine, CA, USA
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
</blockquote>
</div>
<br>
<br>
<span title="neteasefooter"><span id="netease_mail_footer"></span></span></blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Jan 24-26, 2011, Irvine, CA, USA
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
</body>
</html>