How to inser varible in to mysql inside python -


commands .format , %s use in every possible combination without progress. work right when use way:

last_issue = jira.search_issues('assignee = "ahmet" order created desc')[0] 

but need assignee varible , if use way or smthing like:

assignee = "ahmet" last_issue = jira.search_issues('assignee =', assignee, 'order created desc')[0] 

it gives mistake like

response headers = {'vary': 'user-agent', 'x-arequestid': '578x1623860x1', 'x-asessionid': 'x0ubjs', 'x-asen': 'sen-l0000000', 'cache-control': 'no-cache, no-store, no-transform', 'x-content-type-options': 'nosniff', 'x-ausername': 'ekaterina', 'x-seraph-loginreason': 'ok', 'content-encoding': 'gzip', 'transfer-encoding': 'chunked', 'date': 'mon, 11 sep 2017 09:38:10 gmt', 'content-type': 'text/html;charset=utf-8', 'server': 'nginx/1.13.0', 'connection': 'keep-alive'}     response text =  

how should make variable in appropriate way?

it works!

 var = "assignee = '{}' order created desc".format(assignee)  last_issue = jira.search_issues(var)[0]  

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -