queryStr = "select id,title,content from articles where content like '%%%s%%' limit 0,5" % self.keywd sql
这样实现的最终sql相似 : it
select id,title,content from articles where content like '%记%' limit 0,5 select
总结:%%表明最终sql语句中只存在一个% sql语句