您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

Python:ValueError:索引1处不支持的格式字符'''(0x27)

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)
python 2022/1/1 18:25:16 有224人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶