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

Windows [Gesior AAC] Couple of mysql Errors

pierroth

Mar Co.
Joined
Sep 11, 2008
Messages
343
Reaction score
10
Location
Mexico - California
So I managed to install Gesior on Uniserv and managed to obtain a lot of errors hahaha

Could anyone please give me a hand with this? What should I do in my database, what SQL should I run to fix this... :oops:

Thank you! I really appreciate the help!

Code:
Query:    SELECT * FROM `players` ORDER BY `experience` DESC
SQLSTATE:    00000
Driver code:  
Error message:   

Query:    SELECT `id`, `name` FROM `players` ORDER BY `id` DESC LIMIT 1;
SQLSTATE:    00000
Driver code:  
Error message:  

Query:    SELECT COUNT(*) FROM `houses` WHERE `owner`=0;
SQLSTATE:    00000
Driver code:  
Error message:   

Query:    SELECT COUNT(*) FROM `houses` WHERE `owner`=1;
SQLSTATE:    00000
Driver code:  
Error message:   

Query:    SELECT COUNT(*) FROM `players` WHERE `id`>0;
SQLSTATE:    00000
Driver code:  
Error message:   

Query:    SELECT COUNT(*) FROM `accounts` WHERE `id`>0;
SQLSTATE:    00000
Driver code:  
Error message:   

Query:    SELECT COUNT(*) FROM `guilds` WHERE `id`>0;
SQLSTATE:    00000
Driver code:  
Error message:   

Query:    SELECT
SQLSTATE:    42000
Driver code:    1064
Error message:    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 '' at line 1

Query:    SELECT `date` FROM `z_news_tickers` WHERE `hide_ticker` = '0'
SQLSTATE:    00000
Driver code:  
Error message:   

Query:    SELECT `g`.`id` AS `id`, `g`.`name` AS `name`, COUNT(`g`.`name`) AS `frags` FROM `killers` k LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id` LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id` LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id` LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id` WHERE `g`.`id` > 0 AND `k`.`unjustified` = 1 AND `k`.`final_hit` = 1 GROUP BY `name` ORDER BY `frags` DESC, `name` ASC LIMIT 4;
SQLSTATE:    00000
Driver code:   
Error message:   

Query:    SELECT * FROM z_featured_article ORDER BY id DESC LIMIT 1
SQLSTATE:    00000
Driver code:  
Error message:   

Query:    SELECT `players`.`name`, `z_forum`.`post_text`, `z_forum`.`post_topic`, `z_forum`.`icon_id`, `z_forum`.`post_smile`, `z_forum`.`id`, `z_forum`.`replies`, `z_forum`.`post_date` FROM `players`, `z_forum` WHERE `players`.`id` = `z_forum`.`author_guid` AND `z_forum`.`section` = 1 AND `z_forum`.`first_post` = `z_forum`.`id` ORDER BY `z_forum`.`last_post` DESC LIMIT 6
SQLSTATE:    42S22
Driver code:    1054
Error message:    Unknown column 'z_forum.icon_id' in 'field list'
 
Last edited:
Issue # 1
Code:
Query:    SELECT `players`.`name`, `z_forum`.`post_text`, `z_forum`.`post_topic`, `z_forum`.`icon_id`, `z_forum`.`post_smile`, `z_forum`.`id`, `z_forum`.`replies`, `z_forum`.`post_date` FROM `players`, `z_forum` WHERE `players`.`id` = `z_forum`.`author_guid` AND `z_forum`.`section` = 1 AND `z_forum`.`first_post` = `z_forum`.`id` ORDER BY `z_forum`.`last_post` DESC LIMIT 6
SQLSTATE:    42S22
Driver code:    1054
Error message:    Unknown column 'z_forum.icon_id' in 'field list'

Solution:
Code:
ALTER TABLE `z_forum` ADD `icon_id` int(11);

Issue # 2
Code:
Query: SELECT
SQLSTATE: 42000
Driver code: 1064
Error message: 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 '' at line 1

Solution:
Find this random SELECT query and remove it.


As codex mentioned above, the rest are not errors - they are successful queries.
 
So Thanks to Leo, yet again :D I was able to fix the first issue SQLSTATE: 42522. I still don't know how to fix the others.

Here's a picture of how it looks on the website:

sql_error_news_page.jpg


error_sql.jpg


Anyone able to fix it, please PM me. I'm willing to learn :) and pay.

Thank you!
 
Back
Top