Nokturno
Not a human
- Joined
- Aug 7, 2009
- Messages
- 570
- Solutions
- 2
- Reaction score
- 403
hello, i got this database error.
can someone help me with this.
can someone help me with this.
Code:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1452 Cannot add or update a child row: a foreign key constraint fails (`newtest`.`guilds`, CONSTRAINT `guilds_ibfk_1` FOREIGN KEY (`owner_id`) REFERENCES `players` (`id`) ON DELETE CASCADE)' in C:\xampp\htdocs\pot\OTS_Guild.php:178 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Guild.php(178): PDO->query('INSERT INTO `gu...') #1 C:\xampp\htdocs\guilds.php(1071): OTS_Guild->save() #2 C:\xampp\htdocs\index.php(141): include('C:\xampp\htdocs...') #3 {main} thrown in C:\xampp\htdocs\pot\OTS_Guild.php on line 178