Skip to content

Commit

Permalink
exec string bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jbae11 committed Jun 21, 2017
1 parent 10bf9f1 commit 611dd0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ def exec_string(list, search, whatwant):
sqlite query command.
"""

exec_str = ('select ' + whatwant + """ from resources inner join transactions
on transactions.resourceid = resources.resourceid where """
exec_str = ('SELECT ' + whatwant + """ FROM resources INNER JOIN transactions
ON transactions.resourceid = resources.resourceid WHERE """
+ str(search) + ' = ' + str(list[0]))

for ar in list[1:]:
exec_str += ' and ' + str(ar)
exec_str += ' OR ' + str(search) + ' = ' + str(ar)

return exec_str

Expand Down

0 comments on commit 611dd0a

Please sign in to comment.