我正在尝试更新表,但是我要更新的字段(appdata)是varbinary,所以这行不通:
UPDATE `asterisk`.`extensions`
SET `appdata`='ext110,1'
WHERE `context`=0x696E636F6D696E67
AND`exten`=0x3031363134363437333839
AND`priority`='51';
我想我需要先将值转换为二进制,但是我仍然遇到错误
UPDATE `asterisk`.`extensions`
SET `appdata`=BINARY('ext110,1')
WHERE `context`=0x696E636F6D696E67
AND`exten`=0x3031363134363437333839
AND`priority`='51';
错误0:0:MySQL_Prepared_Statement :: setBlob:无效的'parameterIndex'SQL语句:UPDATE
asterisk
。extensions
SETappdata
= BINARY('ext110,1')WHERE {{ 1}} = 0x696E636F6D696E67和context
= 0x3031363134363437333839和exten
='51'