Python database commands

cursor=mydb.cursor()

#query="create database company"
#query="show databases"
#query="create table info( emailid varchar(50), password varchar(15)) "

#query="insert into info (emailid,password) values('b@gmail.com','1234')"

#query="show tables"
query="update info set password='45678'  where emailid like'b@gmail.com'"

#query="select * from info where emailid like 'b@gmail.com'"

cursor.execute(query)

mydb.commit()

#rows=cursor.fetchall()

#for row in rows:
#       print (row)

Reactions:

0 comments:

Post a Comment