q="1"
sql = """
SELECT *
FROM test
WHERE code like '%%s%'
""" % (q)
语句报错,unsupported format character ''' (0x27) at index 66
尝试了很多方法,like的模糊查询%符合和占位符%s没法通用,请问该怎么处理呢?
q="1"
sql = """
SELECT *
FROM test
WHERE code like '%%s%'
""" % (q)
语句报错,unsupported format character ''' (0x27) at index 66
尝试了很多方法,like的模糊查询%符合和占位符%s没法通用,请问该怎么处理呢?
q="1"
sql = """
SELECT *
FROM test
WHERE code like '%%%s%%'
""" % (q)