Hello,
On 02/17/06 17:03, Broch, Andreas wrote:
Hi We installed todays latest openserdev-cvs version on the system and tested the avp_db_query() function again, but its still not working.
Here an example of the current syntax avp_db_query("select column_name1,column_name2 from mytable where username='$fu/username'","$avp(s:value1);$avp(s:value2)")
"/username" is a flag for parameter of avp_db_load() or other functions. The pseudo-variable referring to From username is $fU. Try:
avp_db_query("select column_name1,column_name2 from mytable where username='$fU'","$avp(s:value1);$avp(s:value2)")
Cheers, Daniel
=> Problem: No debug Errors, but no Action The only difference is that, openser now knows the Function( produces no Errors on startup).
But if I load the values from my self defined scheme(s), the data is loaded correctly into the avps (memory).
For example avp_db_load("$fu/username","$avp(s:anyvalue)/$scheme1")
=> Problem new avp's cant be stored to database !
-----Ursprüngliche Nachricht----- Von: Daniel-Constantin Mierla [mailto:daniel@voice-system.ro] Gesendet: Donnerstag, 16. Februar 2006 10:50 An: Broch, Andreas Cc: users@openser.org Betreff: Re: [Users] question about db_schemes and avp functionality
Hello,
On 02/15/06 17:53, Broch, Andreas wrote:
Hi
We have a running IMS test - system without HSS functionality at the moment.
Next step to realize are the Initial Filter Criteria.
->
I want to create my own db_scheme, where I can store the required values of the user profile.
My questions are:
- How can use the db_scheme beside the default avp_table (
usr_preferences ) ?
db_scheme definition allows to specify a custom table name. See: http://www.voice-system.ro/docs/avpops/ar01s05.html#db_scheme
If the table has the same structure as usr_preferences, then you can give the name in the second parameter of avp_db_load(). http://www.voice-system.ro/docs/avpops/ar01s06.html#avp_db_load
- Avp's only have 1 value column. How can I load different attributes
, if the parameters are stored in different columns of the self defined table
If they are in the subscriber table, then you can load them upon authentication: http://openser.org/docs/modules/1.1.x/auth_db.html#AEN147
Otherwise, with the latest cvs version (it was committed yesterday), you can use avp_db_query() http://openser.org/docs/modules/1.1.x/avpops.html#AEN239
Cheers, Daniel
Mfg
Andreas Broch
FTW
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users