Bug #317

150 Update, SQL Failure

Added by Brandon Ma 113 days ago. Updated 111 days ago.

Status:Resolved Start:09/15/2008
Priority:Low Due date:
Assigned to:- % Done:

100%

Category:Web Panel
Target version:1.3.1 Estimated time:0.00 hours

Description

Debug
Unknown column 'BA.ureason' in 'field list'

SQL Query type: EXECUTE
Script: '/sourcebans/index.php'
SQL Query: SELECT bid ban_id, BA.type, BA.ip ban_ip, BA.authid, BA.name player_name, created ban_created, ends ban_ends, length ban_length, reason ban_reason, BA.ureason unban_reason, BA.aid, AD.gid AS gid, adminIp, BA.sid ban_server, country ban_country, RemovedOn, RemovedBy, RemoveType row_type, SE.ip server_ip, AD.user admin_name, AD.gid, MO.icon as mod_icon, CAST AS UNSIGNED) + CAST + CAST * 2 AS UNSIGNED) AS community_id, (SELECT count() FROM sb_demos as DM WHERE DM.demtype='B' and DM.demid = BA.bid) as demo_count, (SELECT count() FROM sb_bans as BH WHERE BH.type = BA.type AND (BH.authid = BA.authid AND BH.authid != '' AND BH.authid IS NOT NULL) OR BH.type = BA.type AND (BH.ip = BA.ip AND BH.ip != '' AND BH.ip IS NOT NULL)) as history_count FROM sb_bans AS BA LEFT JOIN sb_servers AS SE ON SE.sid = BA.sid LEFT JOIN sb_mods AS MO on SE.modid = MO.mid LEFT JOIN sb_admins AS AD ON BA.aid = AD.aid ORDER BY created DESC LIMIT 0,30
SQL Params:

Just threw the updates in, minus all the normal stuff, and it returns this error when trying to retrieve the banlist.

Any fix?

Associated revisions

Revision 151
Added by Erik Minekus 112 days ago

  • Fixed #317
  • Added #65
  • Added new TF2 map images

History

Updated by Derek Denholm 113 days ago

I am getting this also for the banlist page and a simliar sql error for the admin settings page. Ever since I updated to svn 150.

Updated by Johnathon Weaver 113 days ago

the way to fix that and update your site and database would be to goto your site directory make sure you have the updater folder then browse to http://www.bans.yoursite.co.uk/updater

it should update your database and fix the problems then make sure to remove the updater folder :)

Updated by Derek Denholm 113 days ago

Why dont you try it for yourself rather then telling people what to do without doing it yourself?

Updated by Johnathon Weaver 112 days ago

was trying to help and if i hadnt worked it out and did it myself you think i would of posted ?

Updated by Jannik Hartung 112 days ago

  • Category set to Web Panel
  • Status changed from New to Rejected
  • Priority changed from Urgent to Low
  • Target version set to 1.3.1
  • % Done changed from 0 to 100
  • Estimated time set to 0.00

Just execute the querys in updater/data/130.php:
INSERT INTO `sb_settings` (`setting`, `value`) VALUES ('config.summertime', '0');
ALTER TABLE `sb_bans` ADD `ureason` text;
ALTER TABLE `sb_protests` ADD `archiv` tinyint(1) default '0';
ALTER TABLE `sb_submissions` ADD `subname` varchar(128) default NULL;
ALTER TABLE `sb_submissions` ADD `sip` varchar(64) default NULL;
ALTER TABLE `sb_submissions` ADD `archiv` tinyint(1) default '0';

and reset your timezone on the settings page

Updated by Brandon Ma 112 days ago

Thanks for the help Jannik. Much appreciated.

Updated by Erik Minekus 112 days ago

  • Status changed from Rejected to Resolved

It's still a bug. Fixed in r151.

Updated by Brandon Ma 112 days ago

Thanks Erik.

Just out of curiosity, should I run the queries again for those tables that Jannik mentioned above? I only ask, because I updated to it, and I ran the updater, and it said it failed to execute.

Updated by Erik Minekus 111 days ago

If you have already run those queries, edit updater/data/150.php and remove line 2 to 29. Then run the updater again.

Also available in: Atom PDF