0

如果我尝试在 phpmyadmin 中上传音频文件,它会显示 #2006 错误,并且数据类型应该提到 SQL 查询:编辑

INSERT INTO `b7_11386777_test`.`wish` (`pinNo`, `audio`) VALUES 
('1', SOUNDEX(0x52494646b89d430057415645666d74201000000001000100401f0000803e00000200100064617461949d43000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[...]

MySQL 说:

2006 - MySQL 服务器已经消失

我将在 mysql 数据库中插入一个音频文件。进入它需要哪些参数,以及用于将音频文件插入 mysql 数据库的数据类型

4

1 回答 1

0

SOUNDEX()用于匹配具有相似语音的字符串(文本)。如果audio是 type BLOB,您只需SOUNDEX()要从值周围删除:

INSERT INTO b7_11386777_test.wish (pinNo, audio) VALUES ('1', 0x52494646b8...);

但是,您确实应该将文件存储在文件系统中并在数据库中记录文件的路径。

于 2012-09-16T12:53:36.900 回答