Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cursor.execute("UPDATE people SET chats_count = chats_count + 1 WHERE id = '%s'" % person_id)
- cursor.execute( "INSERT INTO ... VALUES( %(x)s, %(y)s, %(z)s )", {'x':person_id, 'y':time_to_string(time), 'z':channel,} )
- insert_statement="""
- INSERT INTO chats(person_id, message_type, created_at, channel)
- VALUES(:person_id,:message_type,:created_at,:channel)
- """
- cursor.execute(insert_statement, person_id='person',message_type='msg',created_at=some_date, channel=3)
Add Comment
Please, Sign In to add comment