Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7190

problem to add data into table using python

$
0
0

i tried to insert data into table using python by using following code :

import MySQLdb    def Handle_DB_Connection(self):        ## Database connection        self.db = MySQLdb.connect(host="localhost", user="root", passwd="", db="mydb")        self.cur = self.db.cursor()################################## in another defself.cur.execute('''INSERT INTO car_info(car_number,owner_company,branch,service_mode,shaceh_number, motor_number,fuel_type,car_type,car_model,car_load,car_weight,car_shape,car_color) VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)''', (car_number, owner_company, branch, service_mode, shaceh_number,motor_number, fuel_type, car_type, car_model, car_load,car_wight, car_shape, car_color))self.db.commit()

but when i clicked add button it just crash without any information when i comment it it just work nice


Viewing all articles
Browse latest Browse all 7190

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>