[Asterisk-Users] Nested MySQL Commands

Mike Fedyk mfedyk at mikefedyk.com
Thu Jan 12 21:37:13 MST 2006


Andreas Sikkema wrote:

>>Is it possible to have nested MySQL queries in extensions.conf?
>> 
>>Ie, perform a query, grab a value, and then jump to another 
>>location in the dialplan and do another query based on that 
>>original value. I'm having problems with the result and 
>>fetchid's and I'm not sure if it's even possible to do this or not.
>>    
>>
>
>Just make sure that you use different variable names for each 
>query if the values should stay available after the next query.
>
>What we tend to do is grab the data from the database and the stuff 
>that should stay around for a longer time is assigned to a new and 
>appropriately named variable. So the original variable can be used 
>again.
>  
>
I'd rather use a hash (also called associative arrays in other 
languages) instead of calling eval to assign a variable.



More information about the asterisk-users mailing list