MySQL Database

K

Kevin Holleran

Hello,

I want to connect to a MySQL database, query for some records, manipulate
some data, and then update the database.

When I do something like this:

db_c.execute("SELECT a, b FROM Users")

for row in db_c.fetchall():

(r,d) = row[0].split('|')

(g,e) = domain.split('.')

db_c.execute("UPDATE Users SET g = '" + g + "' WHERE a ='" + row[0])

Will using db_c to update the database mess up the loop that is cycling
through db_c.fetchall()?

Thanks for your help.

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top