-
I use newrelic for monitoring and such, and i am getting a 100% error rate, and it is pointing to the following block of code in wp-clanwars.php inside of “/wp-content/themes/blackfyre/addons/clan-wars/”
Block of code being:
$dbstruct1 .= "CREATE TABLE IF NOT EXISTS
{$this->tables[‘games’]}` (
id
int(11) unsigned NOT NULL AUTO_INCREMENT,
title
varchar(200) NOT NULL,
abbr
varchar(20) DEFAULT NULL,
icon
bigint(20) unsigned DEFAULT NULL,
g_banner_file
bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (id
),
KEYg_banner_file
(g_banner_file
),
KEYicon
(icon
),
KEYtitle
(title
),
KEYabbr
(abbr
)
) CHARACTER SET utf8 COLLATE utf8_general_ci;”;dbDelta($dbstruct1);
$EZSQL_ERROR = array();$dbstruct2 .= “CREATE TABLE IF NOT EXISTS
{$this->tables['maps']}
(
id
int(10) unsigned NOT NULL AUTO_INCREMENT,
game_id
int(10) unsigned NOT NULL,
title
varchar(200) NOT NULL,
screenshot
bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (id
),
KEYgame_id
(game_id
,screenshot
)
) CHARACTER SET utf8 COLLATE utf8_general_ci;”;dbDelta($dbstruct2);
$EZSQL_ERROR = array();$dbstruct3 .= “CREATE TABLE IF NOT EXISTS
{$this->tables['matches']}
(
id
int(10) unsigned NOT NULL AUTO_INCREMENT,
title
varchar(200) DEFAULT NULL,
date
timestamp NULL DEFAULT CURRENT_TIMESTAMP,
post_id
bigint(20) unsigned DEFAULT NULL,
team1
int(11) unsigned NOT NULL,
team2
int(11) unsigned NOT NULL,
game_id
int(11) unsigned NOT NULL,
match_status
tinyint(1) DEFAULT ‘0’,
description
text NOT NULL,
external_url
varchar(200) DEFAULT NULL,
status
varchar(20) DEFAULT NULL,
reported_reason
text DEFAULT NULL,
locked
tinyint(1) DEFAULT ‘0’,
PRIMARY KEY (id
),
KEYpost_id
(post_id
),
KEYpost_title
(title
),
KEYgame_id
(game_id
),
KEYteam1
(team1
),
KEYteam2
(team2
),
KEYmatch_status
(match_status
),
KEYdate
(date
)) CHARACTER SET utf8 COLLATE utf8_general_ci ;”;
dbDelta($dbstruct3);
$EZSQL_ERROR = array();$dbstruct4 .= “CREATE TABLE IF NOT EXISTS
{$this->tables['rounds']}
(
id
int(10) unsigned NOT NULL AUTO_INCREMENT,
match_id
int(10) unsigned NOT NULL,
group_n
int(11) NOT NULL,
map_id
int(10) unsigned NOT NULL,
tickets1
int(11) NOT NULL,
tickets2
int(11) NOT NULL,
PRIMARY KEY (id
),
KEYmatch_id
(match_id
),
KEYgroup_n
(group_n
),
KEYmap_id
(map_id
)
) CHARACTER SET utf8 COLLATE utf8_general_ci;”;dbDelta($dbstruct4);
$EZSQL_ERROR = array();$dbstruct5 .= “CREATE TABLE IF NOT EXISTS
{$this->tables['teams']}
(
id
int(11) NOT NULL AUTO_INCREMENT,
title
varchar(200) NOT NULL,
logo
bigint(20) unsigned DEFAULT NULL,
home_team
tinyint(1) DEFAULT ‘0’,
post_id
int(30) DEFAULT ‘0’,
PRIMARY KEY (id
),
KEYhome_team
(home_team
),
KEYtitle
(title
)
) CHARACTER SET utf8 COLLATE utf8_general_ci;”;dbDelta($dbstruct5);
$EZSQL_ERROR = array();`Error from newrelic:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘IF’ at line 1
From what i have gathered, The error does not create any issues that i can find, its just rather bothersome. However, commenting out that block of code resolves, but creates a memory issues, where it begins eating away the ram and swap of the server. From the looks of the Query code, all this is, is creating the tables on start, so it creating the error as it does coudl pose a problem.
I request an immediate fix for this issue.
-
Please use the search before making a post. Your question maybe be already answered!
-
Do you need customization work? Are you having trouble installing Wordpress? Feeling lazy and want somebody else to do the hard work for you?
Join our discord!
Need hosting?
Follow us!