def Delet_book(self):
## delet book from db
book_code = self.lineEdit_19.text()
delete_message=QMessageBox.warning(self,'مسح معلومات','هل انت متأكد من مسح الكتاب',
QMessageBox.Yes | QMessageBox.No)
sql = ( '''
DELETE FROM books WHERE code = %s
''' )
self.cur.execute(sql , [ ( book_code ) ] )
self.db.commit()
self.statusBar().showMessage('تم مسح الكتاب بنجاح ')
self.Show_all_Books()
I tried several times to run the function, but each time the execution reached the delete function and stopped
New contributor
محمد العياني is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.