• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

by misstake i removed my samples, can't add them now!

Kaywin

Lord of War WoW/Tibia 2D
Joined
Oct 24, 2008
Messages
541
Reaction score
6
Location
SwedeN
Hello i removed my samples with other accounts by a misstake on the database so now i can't add them if i try to re-install the website.


Step 4 got this error

PHP:
Add samples to DB:
News ticker sample is already in database. New sample is not needed.

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1452 Cannot add or update a child row: a foreign key constraint fails (`otserv`.`players`, CONSTRAINT `players_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE)' in C:\xampp\htdocs\install.php:515 Stack trace: #0 C:\xampp\htdocs\install.php(515): PDO->query('INSERT INTO `pl...') #1 {main} thrown in C:\xampp\htdocs\install.php on line 515

and when i try to use SQL database codes i can't add it cuz they are alredy there but they're not!
 
Make sure that an account exists with the same id as your sample has within their account_id column.
 
Add them by hand! there is the samples i use!

INSERT INTO `players` VALUES(4, 'Paladin Sample', 0, 1, 1, 10, 3, 185, 185, 9300, 44, 44, 44, 44, 128, 0, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 820, 1, 1291680707, 1401807981, 1, 4, 0, 0, '', 1291680708, 0, 0, 151200000, 0, 100, 0, 0, 100, 100, 0, 0, 0, 0, 0, '', 1287563451, 1, '', 0, '', 0, NULL);

INSERT INTO `players` VALUES(2, 'Sorcerer Sample', 0, 1, 1, 10, 1, 185, 185, 9300, 44, 44, 44, 44, 128, 0, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 820, 1, 1291680704, 1401807981, 1, 4, 0, 0, '', 1291680705, 0, 0, 151200000, 0, 100, 0, 0, 100, 100, 0, 0, 0, 0, 0, '', 1287563451, 1, '', 0, '', 0, NULL);

INSERT INTO `players` VALUES(3, 'Druid Sample', 0, 1, 1, 10, 2, 185, 185, 9300, 44, 44, 44, 44, 128, 0, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 820, 1, 1291680710, 1401807981, 1, 4, 0, 0, '', 1291680712, 0, 0, 151200000, 0, 100, 0, 0, 100, 100, 0, 0, 0, 0, 0, '', 1287563451, 1, '', 0, '', 0, NULL);

INSERT INTO `players` VALUES(5, 'Knight Sample', 0, 1, 1, 10, 4, 185, 185, 9300, 44, 44, 44, 44, 128, 0, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 820, 1, 1291680709, 1401807981, 1, 4, 0, 0, '', 1291680709, 0, 0, 151200000, 0, 100, 0, 0, 100, 100, 0, 0, 0, 0, 0, '', 1287563451, 1, '', 0, '', 0, NULL);
 
Back
Top