Computer Science, asked by Anonymous, 4 months ago

What will the following code do?
import mysql.connector
db = mysql.connector.connect(...)
cursor = db.cursor()
sali = "update category set name = "% WHERE ID=%"% ('CSS,2)
cursor.execute(sqli)
db.commit()
print ("Rows affected", cursor.rowcount)
db.close()​

Attachments:

Answers

Answered by valeriy69
1
  1. It will open a database connection to a database.
  2. Creates a statement to update category name to CSS where is is 2
  3. It executes this statement & commits it permanently.
  4. It prints the number of affected rows which in this case is 1
  5. Then closes the correction to the database.

\small\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Answered by harshrawat1
5

Answer:

really do you love me mate

Similar questions