[asterisk-users] Stuck on MySQL UPDATE
Barton Fisher
bhfisher at icpage.com
Mon Apr 16 14:20:08 MST 2007
What I'm retrying to do is update mysql field with the new message ID
that was just recorded. Ideally, I'd like to specify
the field to update using a variable ${BINID} and use ${NEWPHRASENAME}
for the value - I'm not sure asterisk will allow
using a variable for the field name and if not, I'll attempt to create
an exten for each bin to update.
Here the method I'd like to use:
exten => sav,n,MYSQL(Connect connid localhost root password dax)
exten => sav,n,MYSQL(QUERY resultid ${connid}UPDATE\ dnislookup\ SET\
${BINID}\ =\ ${NEWPHRASENAME}\ WHERE\ dnis\ =\ ${IVR-Exten})
But I've tried this too:
exten => sav,n,MYSQL(Connect connid localhost root password dax)
exten => sav,n,MYSQL(QUERY resultid ${connid}UPDATE\ dnislookup\ SET\
bin2\ =\ ${NEWPHRASENAME}\ WHERE\ dnis\ =\ ${IVR-Exten})
However, neither one of these saves to new value into the bin2 (or
${BINID}) field.
From the logs:
Apr 16 12:40:05 VERBOSE[13718] logger.c: == Where Field Name = bin2 and
value to update is 2_4643
Apr 16 12:40:05 DEBUG[13718] pbx.c: Launching 'MYSQL'
Apr 16 12:40:05 DEBUG[13718] pbx.c: Launching 'MYSQL'
Apr 16 12:40:05 WARNING[13718] app_addon_sql_mysql.c: aMYSQL_query:
missing some arguments
Apr 16 12:40:05 DEBUG[13718] pbx.c: Launching 'MYSQL'
Apr 16 12:40:05 WARNING[13718] app_addon_sql_mysql.c: Identifier 160,
identifier_type 2 not found in identifier list
Apr 16 12:40:05 WARNING[13718] app_addon_sql_mysql.c: Invalid result
identifier 160 passed in aMYSQL_clear
Apr 16 12:40:05 DEBUG[13718] pbx.c: Launching 'MYSQL'
Can you suggest something?
Bart
More information about the asterisk-users
mailing list