[OpenSER-Users] Fetching multiple rows from DB.
Klaus Darilion
klaus.mailinglists at pernau.at
Fri Jan 4 09:39:02 CET 2008
Alex Balashov schrieb:
> So, is there a legitimate way to retrieve multiple rows using
> avp_db_query()
yes
http://openser.org/docs/modules/1.3.x/avpops.html#AEN287
"...If the result gives many rows, then multiple AVPs with corresponding
name will be added..."
> and iterate through them with a loop structure?
There are no loop constructs in openser. But you could do it yourself by
calling the same route block recursive (process the AVP and then delete
it - this will give you the next row. If you have multiple AVPs with the
same name there are processes like a stack. Addressing the AVP gives the
the topmost AVP. Deleting the AVP deletes the topmost AVP and you can
access the next AVP).
> Does AVP support the notion of an "array" construction?
yes
http://openser.org/dokuwiki/doku.php/pseudovariables:devel#avps
> And if not, how do I get OpenSER to apply a set of rules
> codified in custom database structures?
>
> --
> Alex Balashov
> Evariste Systems
> Web : http://www.evaristesys.com/
> Tel : +1-678-954-0670
> Direct : +1-678-954-0671
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list