PyMySQL/Tornado-MySQL

cannot update

hugo021 opened this issue · 6 comments

sql2='update watch_monitor_profile set data='test' where id=43127'
yield cur1.execute(sql2)

but it not work,and nothing happend

I can't reproduce what you said.
Please provide simple standalone script to reproducible.

No response for long time.

I'm having this same problem.

conn = yield tornado_mysql.connect(host='host', port=3306, user='root', passwd='', db='dbname')
        cur = conn.cursor()
        yield cur.execute("select id, ad_id, someother_id, another_id, onemore_id from links where id = %s" %idd )
        found = cur.fetchone()
        if found:
            print 'yes found'
            yield cur.execute("update imp set imp_count = imp_count + 1 where id = %s" %idd)

Thoughts?

@scoopseven You didn't commit, do you?

I don't see commit anywhere in the docs or codebase. cur.commit()?

yield conn.commit()