except MySqlDb.OperationalError,error:
print "Error:",error
sys.exit( 1)
else:
data = c.fetchall()
print "record:" + str( len(data) )
for entry in data:
status = int(entry[9])
userno = int(entry[3])
e.execute("delete from ESM_WapUser Where UserNo = " + str( entry[3] ))
if status == 4: #删除
continue
# if status == 2: #冻结
# continue
# if status == 3: #开通试用
# continue;
# pprint.pprint(entry)
text = ' Values( '
text = text +"'"+ str( entry[0]) + "',"
text = text +"'"+ str( entry[1]) + "',"
text = text +"'"+ str( entry[2]) + "',"
text = text + str( entry[3] ) + ","
text = text +"'"+ str( entry[4]) + "',"
text = text +"'"+ str( entry[5]) + "',"
text = text +"'"+ str( entry[6]) + "',"
text = text +"password('"+ str( entry[7]) + "'),"
text = text + str( entry[8]) + ","
text = text + str( entry[9]) + ","
text = text +"'"+ str( entry[10]) + "',"
text = text +"'"+ str( entry[11]) + "',"
text = text +"'"+ str( entry[12]) + "',"
text = text +"'"+ str( entry[13]) + "',"
text = text +"'"+ str( entry[14]) + "',"
text = text +"'"+ str( entry[15])
text = text + "')"