看起来python会将%解释为类似printf的格式字符。尝试使用%%?
"SELECT fileid
FROM files
WHERE description LIKE '%%%s%%'
OR filename LIKE '%%%s%%'
OR uploader LIKE '%%%s%%'
ORDER BY fileid DESC" % (search, search, search)
Python:ValueError:索引1处不支持的格式字符'''(0x27)
看起来python会将%解释为类似printf的格式字符。尝试使用%%?
"SELECT fileid
FROM files
WHERE description LIKE '%%%s%%'
OR filename LIKE '%%%s%%'
OR uploader LIKE '%%%s%%'
ORDER BY fileid DESC" % (search, search, search)