学习是最好的投资!
可以尝试不要自己拼SQL语句,利用系统库自带的函数,例如
results = cur.select(table = 'articles', columns = ['id','link','is_keywords_avaliable'], where = correct_parms) # 具体的参数我也记得不清楚,可以自己查查看。
利用格式化字符串可以方便地替换参数。
sql = "select {columns} from {table} {is_where} {condition}".format(columns = 'id, link, is_keywords_available', table = 'articles', is_where = "where", condition = ".....")
可以尝试不要自己拼SQL语句,利用系统库自带的函数,例如
利用格式化字符串可以方便地替换参数。