• 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!

Making god character

XouruS

Active Member
Joined
Dec 29, 2009
Messages
941
Reaction score
36
Location
Canada
Hello, im having trouble making a god character..
When i go to my character in the sql database it dosent offer me to make it group id 6..

I tried making it with this quarry
Code:
UPDATE `forgottenserver`.`players` SET `group_id` = '6' WHERE `players`.`id` =12

and i got this error

Code:
#1452 - Cannot add or update a child row: a foreign key constraint fails (`forgottenserver`.`players`, CONSTRAINT `players_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`))
 
UPDATE players SET group_id = 6 WHERE id = 12;

error again..
Code:
#1452 - Cannot add or update a child row: a foreign key constraint fails (`forgottenserver`.`players`, CONSTRAINT `players_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`))
UPDATE players SET group_id =6 WHERE id =12
 
SQL:
UPDATE `players` SET `group_id` = 3 WHERE `id` = 12 LIMIT 1;
UPDATE `accounts` SET `type` = 5, `group_id` = 3 WHERE `id` = (SELECT `account_id` FROM `players` WHERE `id` = 12 LIMIT 1) LIMIT 1;
 
SQL:
UPDATE `players` SET `group_id` = 3 WHERE `id` = 12 LIMIT 1;
UPDATE `accounts` SET `type` = 5, `group_id` = 3 WHERE `id` = (SELECT `account_id` FROM `players` WHERE `id` = 12 LIMIT 1) LIMIT 1;

Code:
Fel
SQL-fråga:  

UPDATE `accounts` SET `type` =5,
`group_id` =3 WHERE `id` = ( SELECT `account_id` 
FROM `players` 
WHERE `id` =12
LIMIT 1 ) 
LIMIT 1 ;



MySQL sa:  

#1054 - Unknown column 'type' in 'field list'
 
No, you must create a new database because you had a wrong schema :p

This time, import file "schemas/mysql.sql" into the database. :p
 
Back
Top