[OpenSIPS-Users] Regarding avp_db_query
Răzvan Crainea
razvan at opensips.org
Mon Nov 27 03:33:08 EST 2017
Hi, Vishal!
You can find the answer to your question in the function's
documentation[1]: If the result gives many rows, then multiple AVPs with
corresponding name will be added.
Consider the following query:
avp_db_query("select group where username='$tu'", "$avp(group)");
The first line of the result can be accessed using $avp(group) (or
$(avp(group)[0])), the second line $(avp(group)[1]), and so on.
[1] http://www.opensips.org/html/docs/modules/2.4.x/avpops.html#idp3469424
Best regards,
Răzvan Crainea
OpenSIPS Developer
www.opensips-solutions.com
On 11/24/2017 08:56 PM, Vishal Pai wrote:
> Hi Everyone
>
> I just want to know what is correct to fetch all the row from database
> using avp_db_query. Currently I am getting only first row in result.
>
> One more think I want to know is it possible to get array of for
> variable in Opensips configuration file.
>
>
> Thanks
>
> Vishal Pai
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20171127/490d5b80/attachment.html>
More information about the Users
mailing list