TroubleInTerroristTown / Public

The game is about a group of "terrorists" who have traitors among them, out to kill everyone who's not a traitor.
https://forums.alliedmods.net/showthread.php?p=2357981
GNU General Public License v3.0
93 stars 38 forks source link

SQL Error in Error Logs #316

Closed jljr222 closed 6 years ago

jljr222 commented 6 years ago

L 05/01/2018 - 05:55:41: [ttt_shop.smx] (SQL_AlterCreditsColumn) Query failed: duplicate column name: credits

Here's is a list what we need:

Bara commented 6 years ago

Which mysql version do you have? I can't reproduce this with 10.1.29-MariaDB but i could update thequery like this one:

SET @shopCredits = (SELECT IF( (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'ttt' AND table_schema = DATABASE() AND column_name = 'credits' ) > 0, "SELECT 1", "ALTER TABLE ttt ADD COLUMN credits INT(11) NOT NULL DEFAULT 0" )); PREPARE shopStatement FROM @shopCredits; EXECUTE shopStatement; DEALLOCATE PREPARE shopStatement;

// Edit So far i know, multiple queries doesn't work with sourcemod....

jljr222 commented 6 years ago

mysql Ver 14.14 Distrib 5.6.38

Bara commented 6 years ago

Could you try the build id 1589?

jljr222 commented 6 years ago

I'll try when I get out of work. Thanks @Bara

jljr222 commented 6 years ago

Just tried the latest dev release and this issue seems resolved.

lock[bot] commented 5 years ago

This thread has been automatically locked.