0

i'm trying to call a query in pymysql where i have two different values, one is a string and the second one is an array of strings but when i try i get an error. This is the code:

def select_transactions(cursor,addresses):

    #query for select all the transactions id and description from proposed_transactions table
    get_query = "SELECT unsigned_tx, sent_date FROM proposed_transactions WHERE status =%s AND msig_address IN ('%s')" 
    cursor.execute(get_query,( "SENT" , addresses))
    result = mappedfetchall(cursor)

    return result

How can i call this query with this two different parameters in wich one is WHERE VALUE = %s and one is WHERE value IN %s ? Can someone help me? thanks

Simospa
  • 81
  • 6
  • While this has already been marked as a duplicate and it's likely no further investigation is needed in your specific case, in the future please paste the full error message (including traceback if one was shown). It is not at all useful to just say "I get an error". – Kemp Jan 27 '22 at 12:05

0 Answers0