Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`glot6658_invoice_db`.`invoices`, CONSTRAINT `invoices_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`)) in /home/glot6658/public_html/invoice-app/app/models/Customer.php:48
Stack trace:
#0 /home/glot6658/public_html/invoice-app/app/models/Customer.php(48): PDOStatement->execute(Array)
#1 /home/glot6658/public_html/invoice-app/app/controllers/CustomerController.php(29): Customer->delete('1')
#2 /home/glot6658/public_html/invoice-app/public/index.php(75): require('/home/glot6658/...')
#3 {main}
thrown in /home/glot6658/public_html/invoice-app/app/models/Customer.php on line 48