Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

fix breaking!! #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions addons/sourcemod/scripting/surftimer/sql.sp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ public void db_setupDatabase()

if (strcmp(szIdent, "mysql", false) == 0)
{
// https://github.com/nikooo777/ckSurf/pull/58
SQL_FastQuery(g_hDb, "SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));");
// Remove incompatability
SQL_FastQuery(g_hDb, "SET sql_mode=(SELECT REPLACE(@@sql_mode,'TRADITIONAL',''));");

// for unsupported hosts set session instead using SET @@SESSION.sql_mode= '';

g_DbType = MYSQL;
}
else if (strcmp(szIdent, "sqlite", false) == 0)
Expand All @@ -40,8 +43,8 @@ public void db_setupDatabase()

// If updating from a previous version
SQL_LockDatabase(g_hDb);
SQL_FastQuery(g_hDb, "SET NAMES 'utf8'");
SQL_FastQuery(g_hDb, "SET name 'utf8'");
SQL_FastQuery(g_hDb, "SET NAMES 'utf8mb4_unicode_ci'");
SQL_FastQuery(g_hDb, "SET name 'utf8mb4_unicode_ci'");


// Check if tables need to be Created or database needs to be upgraded
Expand Down Expand Up @@ -8439,4 +8442,4 @@ public int ChooseMapMenuHandler(Menu menu, MenuAction action, int param1, int pa
}
else if (action == MenuAction_End)
delete menu;
}
}