Hi! pythonanywhere console return "(": syntax error for sqlite3 request, screenshot: http://take.ms/QEtS3
sqlite3.OperationalError: near "(": syntax error
but the request is executed successfully in database and on localhost, screenshot: http://take.ms/mfTJN
code:
cur.executescript('update last_reminders set (user_id, chat_id, last_reminder_text, reminder_message_id, reminder_sent_at) = ("{uid}", "{ch_id}", "{m_text}", "{mes_id}", "{s_at}") where (user_id = "{uid}") and (chat_id = "{ch_id}"); insert into last_reminders (user_id, chat_id, last_reminder_text, reminder_message_id, reminder_sent_at) select "{uid}", "{ch_id}", "{m_text}", "{mes_id}", "{s_at}" where (Select Changes() = 0)'.format(uid=reminder[0], ch_id=reminder[1], m_text=reminder[2], mes_id=reminder[3], s_at=int(datetime.today().timestamp())))
print result from screenshot:
update last_reminders set (user_id, chat_id, last_reminder_text, reminder_message_id, reminder_sent_at) = ("116794415", "116794415", "test", "667", "1515583062") where (user_id =
"116794415") and (chat_id = "116794415"); insert into last_reminders (user_id, chat_id, last_reminder_text, reminder_message_id, reminder_sent_at) select "116794415", "116794415", "test", "667", "1515583062" where (Select Changes() = 0)