[SOLVED] Ghost column in player table

Game development with Board Game Arena Studio
Post Reply
User avatar
Woodruff
Posts: 412
Joined: 08 March 2014, 00:53

[SOLVED] Ghost column in player table

Post by Woodruff »

Hi,

I recently changed my model for extra-columns the player table. I switched from:

Code: Select all

ALTER TABLE `player` ADD `player_order` int(10) unsigned;
To:

Code: Select all

ALTER TABLE `player` ADD `player_icon_count_1` SMALLINT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `player` ADD `player_icon_count_2` SMALLINT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `player` ADD `player_icon_count_3` SMALLINT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `player` ADD `player_icon_count_4` SMALLINT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `player` ADD `player_icon_count_5` SMALLINT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `player` ADD `player_icon_count_6` SMALLINT UNSIGNED NOT NULL DEFAULT 0;
I restarted the game and everything seemed OK. But at one point of the game, sooner or later, when the client make a call to the server, I get this message:

Code: Select all

Unexpected error:  Error while processing SQL request: INSERT INTO zz_replay2_player (`player_no`,`player_id`,`player_canal`,`player_name`,`player_avatar`,`player_color`,`player_score`,`player_score_aux`,`player_zombie`,`player_ai`,`player_eliminated`,`player_next_notif_no`,`player_enter_game`,`player_over_time`,`player_is_multiactive`,`player_start_reflexion_time`,`player_remaining_reflexion_time`,`player_beginner`,`player_order`) SELECT `player_no`,`player_id`,`player_canal`,`player_name`,`player_avatar`,`player_color`,`player_score`,`player_score_aux`,`player_zombie`,`player_ai`,`player_eliminated`,`player_next_notif_no`,`player_enter_game`,`player_over_time`,`player_is_multiactive`,`player_start_reflexion_time`,`player_remaining_reflexion_time`,`player_beginner`,`player_order` FROM player
Unknown column 'player_order' in 'field list'
This error seems to be triggered from a file on the framework I can't access. There is a mention of player_order column which causes the crash but no mention of the columns I had next. Is there an update which didn't proceed on server side so this file have remained in an old version?

I did not saved or load anything using Save=>2 and 2=>Load . I double-checked: I've correctly removed every mention of player_order from my code, both in dbmodel.sql and game.php. Everything seems to be up-to-date in the database viewed in PHPmyAdmin.

What is your guess on what goes wrong?

Thanks a lot!

Tcheby
Last edited by Woodruff on 31 July 2016, 09:03, edited 1 time in total.
User avatar
Een
Posts: 3854
Joined: 16 June 2010, 19:52

Re: Ghost column in player table

Post by Een »

Hello,

That's strange, that shouldn't happen as SQL requests to populate zz_replay tables are created dynamically from .game.php SQL requests.
I restarted the studio server in case this is some file caching trouble.
Can you please stop that game, start a new one and see if the trouble is still there?

Cheers,
Een
User avatar
Woodruff
Posts: 412
Joined: 08 March 2014, 00:53

[SOLVED] Ghost column in player table

Post by Woodruff »

Hi,

Thanks Een. Restarting studio effectively solved the problem. Nothing seems to trigger the error anymore.
It seems to be a trouble with some cache indeed, but as you explain that's strange...
If I can help you and/or run some tests in order to investigate on that problem, be my guest.

Cheers,

Tchebychev
Last edited by Woodruff on 14 June 2017, 21:31, edited 1 time in total.
kenciro
Posts: 2
Joined: 27 March 2017, 19:55

Re: [SOLVED] Ghost column in player table

Post by kenciro »

Same problem
I changed my sql structure and now i have thi error.

Code: Select all

Unexpected error: Error while processing SQL request: INSERT INTO zz_replay1_player (`player_no`,`player_id`,`player_canal`,`player_name`,`player_avatar`,`player_color`,`player_score`,`player_score_aux`,`player_zombie`,`player_ai`,`player_eliminated`,`player_next_notif_no`,`player_enter_game`,`player_over_time`,`player_is_multiactive`,`player_start_reflexion_time`,`player_remaining_reflexion_time`,`player_beginner`,`ingeniocount`,`risorsecount`,`tiranniacount`,`card_id_1`,`card_id_2`,`card_id_3`) SELECT `player_no`,`player_id`,`player_canal`,`player_name`,`player_avatar`,`player_color`,`player_score`,`player_score_aux`,`player_zombie`,`player_ai`,`player_eliminated`,`player_next_notif_no`,`player_enter_game`,`player_over_time`,`player_is_multiactive`,`player_start_reflexion_time`,`player_remaining_reflexion_time`,`player_beginner`,`ingeniocount`,`risorsecount`,`tiranniacount`,`card_id_1`,`card_id_2`,`card_id_3` FROM player Unknown column 'card_id_1' in 'field list'
... but card_id_1,card_id_2, card_id_3 were canceled.
Post Reply

Return to “Developers”