Quantcast
Channel: MySQL Forums - Connector/Python
Viewing all articles
Browse latest Browse all 384

sick and twisted behaviour (no replies)

$
0
0
Hello,

apparently I can create one cursor , execute one query and that's it

If I repeat the query , then no queries are pushed to the db

I cant use multiple cursors and I cant reuse the same cursor to execute different sort of statements...

not only doesn'it work but it seems to invalidate the first cursor execution

just insane

connection = mysql.connector.connect(user='root', password='***********',host='localhost',port=3306,buffered=True,unix_socket='/var/run/mysqld/mysqld.sock')
cursor = connection.cursor()

cursor.execute("INSERT INTO ... \
INSERT INTO ..."
,multi=True)

connection.commit()

cursor.close()

cursor = connection.cursor()

cursor.execute("INSERT INTO ... \
INSERT INTO ..."
,multi=True)

connection.commit()

cursor.close()

connection.close()

can someone explain to me what is wrong with the connector ?

thanks

Viewing all articles
Browse latest Browse all 384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>