On Wednesday 31 December 2008, Bogdan-Andrei Iancu wrote:
> How it works:
> =============
>
> 1) define all the DB connections you want to use in AVPOPS module be
> multiple definitions of "db_url" param:
> modparam("avpops","db_url","mysql://user:pas...@host/database")
> modparam("avpops","db_url","1
> postgres://user:pas...@host/osips") modparam("avpops","db_url","2
> mysql://user:pas...@localhost/opensips_1_4")
> Note that the db url string is prefixed by a numerical id - a db_url
> reference number that will be used later to specify what DB connection
> to be used.
>
> 2) use it - all avp_db_xxxx function takes as optional 3rd parameter
> the db connection id. If this param is missing, the default (id 0)
> connection is to be assumed.
>
> Ex:
> # load using default db connection (backward compatible)
> avp_db_load("$fu","$(i:678)");
> # load using db connection id 2
> avp_db_load("$fu","$(i:678)", "2");
It would be nicer if names could be used instead of numeric ids to
identify a connection, as they are easier to remember and more user
friendly.
--
Dan
_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel