[asterisk-users] MySQL query from extensions?
Barton Fisher
bhfisher at icpage.com
Fri Apr 13 12:43:08 MST 2007
What wrong with this:
[get-dnisinfo]
; sub-routine to get owner's password
exten => s,1,Verbose( == )
exten => s,n,MYSQL(Connect connid localhost root password dax)
exten => s,n,MYSQL(Query resultid ${connid} SELECT\ password\ FROM\
dnislookup\ WHERE\ dnis=\'${IVR-Exten}\')
exten => s,n,MYSQL(Fetch fetchid ${password} password)
exten => s,n,Verbose( == Password found was
[${password}]-[${connid}]-[${fetchid}]-[${resultid}] )
exten => s,n,MYSQL(Clear ${password})
exten => s,n,MYSQL(Disconnect ${connid})
exten => s,n,return
I found no less than 15 ways to write this query on the net searches
(with and without escapes and quotes), now I give up and ask here. I
can do this query from the command and get the correct results.
any ideas?
Thanks, Bart
More information about the asterisk-users
mailing list