New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to provide db_id to avp_db_query() as either $var or $avp #694
Comments
@mishehu would you need both string and int values for the db id in a variable?
or you would also need something like
|
@ionutrazvanionita - As far as how I'm going to use it, I will be using only an integer value. But to be honest, maybe other people will find it useful to accept a string as well? I'm not sure. Integer is fine for me, but I'll defer to your better judgment. :-) |
That's why i asked, because i didn't know how you will use it. Anyhow, i made it work both use. Please check if everything is ok and close the ticket if so 8a51273 |
This works great. Thank you for including this. |
Yep, it's working great for us, thanks for making the change! |
@ionutrazvanionita : There seems to be a problem at the current time. We're using this patch on the 2.1 branch, and it doesn't look like it was backported to 2.1. Can you please verify? The patch you previously provided works for 4 out of 5 hunks. There is an avpops.c.rej that I'm attaching. This wa done against commit 0a642c5 . Thanks! |
Sorry, missed closing this out for you. :-) |
Spoke with Vlad-Paiu about this. Currently avp_db_query() requires that the db_id (3rd param) be a constant. By allowing for avp_db_query() to use a $var and $avp, it would allow simplified iteration across an arbitrary number of avpops db urls as defined by the user, and keep from unnecessarily duplicating code.
If it wouldn't be too much trouble, could this functionality please be added? Much thanks in advance.
The text was updated successfully, but these errors were encountered: