Hi; I have the following code:
while i < num: cat = 'cat' + str(i) cat = form.getfirst(cat, '') item = 'item' + str(i) item = form.getfirst(item, '') descr = 'descr' + str(i) descr = form.getfirst(descr, '') uom = 'uom' + str(i) uom = form.getfirst(uom, '') price = 'price' + str(i) price = form.getfirst(price, '') sql = 'Category="' + cat + '", Item="' + item + '", Description="' + descr + '", UOM="' + uom + '", Price="' + price + '"' sql = 'insert into %s values (%s);' % (company, sql) cursor.execute(sql) i += 1 Now, all of this posts to the mysql database, but it forms an infinite loop! I have num == 1! I have printed num to make sure it's actually only 1 (or 2, depending). What in the heck am I doing wrong? TIA, Victor
-- http://mail.python.org/mailman/listinfo/python-list