PDA

View Full Version : The database error and Solutions


solong2
11-27-2007, 05:09 AM
here what you need

The problem
mysql error: Unknown column 'lastthread' in 'field list'

Solutions

ALTER TABLE `forum` ADD `lastthread` CHAR( 250 ) NOT NULL ;
ALTER TABLE `forum` ADD `lastthreadid` INT( 10 ) NOT NULL ;

==========

The problem


mysql error: Unknown column 'u.downloads' in 'where clause'


Solutions



ALTER TABLE `user` ADD `downloads` text NOT NULL;

==========

The problem


mysql error: Unknown column 'avatardata' in 'field list'


Solutions



ALTER TABLE `user` ADD `avatardata` INT(10) UNSIGNED DEFAULT '0' NOT NULL;

==========

The problem

mysql error: Unknown column 'maxnewthreadtime' in 'field list'


Solutions


ALTER TABLE `usergroup` ADD `maxnewthreadtime` INT(10) UNSIGNED DEFAULT '0' NOT NULL;


==========

The problem


MySQL Error : Unknown column 'ipaddress' in 'field list'


Solutions


ALTER TABLE `moderatorlog` ADD `ipaddress` INT(10) UNSIGNED DEFAULT '0' NOT NULL;



==========


The problem


MySQL Error : Unknown column 'showbirthday' in 'where clause'


Solutions




ALTER TABLE `user` ADD `showbirthday` MEDIUMBLOB NOT NULL;

or

ALTER TABLE `user` ADD `showbirthday` INT(10) UNSIGNED DEFAULT '0' NOT NULL;



==========


The problem


MySQL Error : Unknown column 'receivebulletin' in 'field list'


Solutions


ALTER TABLE `user` ADD `receivebulletin` INT(10) UNSIGNED DEFAULT '0' NOT NULL;

or

ALTER TABLE `user` ADD `receivebulletin_type` INT(10) UNSIGNED DEFAULT '0' NOT NULL;



==========


The problem


MySQL Error : Unknown column 'canview' in 'on clause'



Solutions


ALTER TABLE `subscribethread` ADD `canview` smallint(5) unsigned NOT NULL default '1';



==========

The problem


MySQL Error : Unknown column 'maxnewthread' in 'field list'



Solutions

ALTER TABLE `usergroup` ADD `maxnewthread` INT(10) UNSIGNED DEFAULT '0' NOT NULL;



==========

The problem



mysql error: Unknown column 'thread.threadid' in 'on clause'


Solutions



ALTER TABLE `thread` ADD `threadid` INT(10) UNSIGNED DEFAULT '0' NOT NULL;



==========

The problem


MySQL Error : Unknown column 'skype' in 'field list'



Solutions




ALTER TABLE `user` ADD `skype` MEDIUMBLOB NOT NULL;



==========

The problem

MySQL Error : Unknown column 'xxxx_vb.setting.grouptitle' in 'on clause'


Solutions



ALTER TABLE `setting` ADD `settinggroupid` SMALLINT( 5 ) UNSIGNED DEFAULT '0' NOT NULL;



==========

The problem



MySQL Error : Unknown column 'titleonly' in 'field list'



Solutions




ALTER TABLE search ADD titleonly SMALLINT UNSIGNED NOT NULL DEFAULT '0'




==========

The problem



mysql error: Unknown column 'customavatar.avatardata' in 'field list'



Solutions



ALTER TABLE `customavatar` ADD `avatardata` MEDIUMBLOB NOT NULL;


=========

The problem



MySQL Error : Unknown column 'completed' in 'where clause'



Solutions



ALTER TABLE search ADD `completed` smallint(5) unsigned NOT NULL default '1';


==========

The problem



MySQL Error : Unknown column 'phrasegroup_global' in 'field list'



Solutions




ALTER TABLE `language` ADD `phrasegroup_global` mediumtext



==========

The problem



MySQL Error : Can't find FULLTEXT index matching the column list



Solutions




ALTER TABLE thread ADD FULLTEXT(title);



==========

The problem




MySQL Error : Unknown column 'showprivate' in 'field list'



Solutions




ALTER TABLE forum ADD showprivate TINYINT UNSIGNED NOT NULL DEFAULT '0';



==========

The problem



MySQL Error : Unknown column 'hhroptions' in 'field list'


Solutions



ALTER TABLE `usergroup` ADD `hhroptions` VARCHAR( 255 ) DEFAULT '0' NOT NULL ;


==========

The problem



MySQL Error : Unknown column 'datatype' in 'field list'



Solutions



Alter table `setting` ADD `datatype` enum('free','number','boolean') NOT NULL default 'free';


==========


The problem



MySQL Error : Unknown column 'defaultsortfield' in 'field list'



Solutions


ALTER TABLE forum ADD defaultsortfield VARCHAR(50) NOT NULL DEFAULT 'lastpost';


ALTER TABLE forum ADD defaultsortorder ENUM('asc', 'desc') NOT NULL DEFAULT 'desc';

==========



The problem



MySQL Error : Unknown column 'warnings' in 'field list'



Solutions




ALTER TABLE user ADD COLUMN `warnings` int(10) unsigned NOT NULL default '0';



=========

The problem



MySQL Error : Unknown column 'defaultsortorder' in 'field list'




Solutions



Alter table `forum` DROP `defaultsortorder`;
Alter table `forum` DROP `defaultsortorder`;
Alter table `forum` ADD `defaultsortfield` varchar(50) NOT NULL default 'lastpost';
Alter table `forum` ADD `defaultsortorder` enum('asc','desc') NOT NULL default 'desc';
Alter table `forum` ADD `showprivate` tinyint(3) unsigned NOT NULL default '0';


==========

The problem



mysql error: Unknown column 'lastvote' in 'field list'



Solutions




ALTER TABLE `poll` ADD `lastvote` INT(15) DEFAULT '0' NOT NULL;


==========

The problem



MySQL Error : Unknown column 'executionorder' in 'field list'




Solutions




alter table `plugin` add `executionorder` smallint(5) unsigned NOT NULL default '5';


==========




The problem



MySQL Error : Unknown column 'styleid' in 'where clause'



Solutions



ALTER TABLE `style` ADD `styleid` INT(10) UNSIGNED DEFAULT '0' NOT NULL;


==========

The problem


MySQL Error : Unknown column 'signaturepermissions' in 'field list'



Solutions



alter table usergroup add `signaturepermissions` int(10) unsigned NOT NULL default '0';


==========

The problem



MySQL Error : Unknown column 'defaultsortfield' in 'field list'



Solutions




Alter table `forum` DROP `defaultsortfield`;
Alter table `forum` DROP `defaultsortorder`;
Alter table `forum` ADD `defaultsortfield` varchar(50) NOT NULL default 'lastpost';
Alter table `forum` ADD `defaultsortorder` enum('asc','desc') NOT NULL default 'desc';
Alter table `forum` ADD `showprivate` tinyint(3) unsigned NOT NULL default '0';


==========

The problem



MySQL Error : Unknown column 'field1' in 'field list'




Solutions






ALTER TABLE userfield add `field1` mediumtext ;
ALTER TABLE userfield add `field2` mediumtext ;
ALTER TABLE userfield add `field3` mediumtext ;
ALTER TABLE userfield add `field4` mediumtext ;
ALTER TABLE userfield add `field5` mediumtext ;
ALTER TABLE userfield add `field6` mediumtext ;
ALTER TABLE userfield add `field7` mediumtext ;
ALTER TABLE userfield add `field8` mediumtext ;
ALTER TABLE userfield add `field9` mediumtext ;
ALTER TABLE userfield add `field10` mediumtext ;
ALTER TABLE userfield add `field11` mediumtext ;
ALTER TABLE userfield add `field12` mediumtext ;
ALTER TABLE userfield add `field13` mediumtext ;
ALTER TABLE userfield add `field14` mediumtext ;



==========





The problem

رمز PHP:
MySQL Error : Unknown column 'whoviewed' in 'field list'



Solutions




ALTER TABLE `thread` ADD `whoviewed` INT(10) UNSIGNED DEFAULT '0' NOT NULL;


==========



The problem




MySQL Error : Unknown column 'ipaddress' in 'field list'



Solutions



ALTER TABLE `moderatorlog` ADD `ipaddress` MEDIUMBLOB NOT NULL;
==========

The problem



MySQL Error : Unknown column 'user.htmail' in 'field list'



Solutions



ALTER TABLE `user` CHANGE `htmail` `msn` VARCHAR( 100 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;


==========

The problem



MySQL Error : Unknown column 'userfield.field16' in 'field list'



Solutions



ALTER TABLE userfield ADD `field16` mediumtext;

==========



The problem



MySQL Error : Unknown column 'adminoptions' in 'field list'



Solutions




ALTER TABEL user ADD `adminoptions` int(10) unsigned NOT NULL default '0';


==========

The problem



MySQL Error : Unknown column 'infractiongroupid' in 'field list'



Solutions




ALTER TABEL user ADD `infractiongroupid` smallint(5) unsigned NOT NULL default '0';


==========

The problem

mysql error: Unknown column 'title' in 'where clause'


Solutions




Alter table `profilefield` add `title` varchar(50) NOT NULL default '';


==========

The problem



MySQL Error : Unknown column 'customprofilepic.width' in 'field list'



Solutions




ALTER TABLE customprofilepic ADD `width` smallint(5) unsigned NOT NULL default '0';



==========

The problem



MySQL Error : Unknown column 'post_parsed.styleid_code' in 'on clause'



Solutions


ALTER TABLE `post_parsed` ADD `styleid_code` int(11) NOT NULL default '-1';

==========

The problem



MySQL Error : Unknown column 'maxnewthread' in 'field list'



Solutions


ALTER TABLE `usergroup` ADD `maxnewthread` INT( 11 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `usergroup` ADD `maxnewtime` INT( 11 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `usergroup` ADD `maxnewpost` INT( 11 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `usergroup` ADD `maxnewposttime` INT( 11 ) DEFAULT '0' NOT NULL ;


==========

The problem



MySQL Error : Unknown column 'lastpostid' in 'field list'



Solutions




ALTER TABLE user ADD `lastpostid` int(10) unsigned NOT NULL default '0';
==========

The problem



MySQL Error : Unknown column 'infractiongroupid' in 'field list'


Solutions




ALTER TABLE `infractiongroup` ADD `infractiongroupid` int(10) unsigned NOT NULL auto_increment;


or


ALTER TABLE user ADD `infractiongroupid` smallint(5) unsigned NOT NULL default '0' ;



==========

The problem



MySQL Error : Unknown column 'grouptitle' in 'from



Solutions



ALTER TABLE `settinggroup` ADD `grouptitle` varchar(50) NOT NULL;



==========

Marco van Herwaarden
11-27-2007, 06:12 AM
Not sure what triggered you to create this thread or why you have ran into these database errors, but giving this as a standard solution for these errors is not the best thing to do.

If someone runs into these errors, he would first need to determine the cause of these errors, not just fight the symptoms by adding a lot of columns.

Lynne
11-27-2007, 02:09 PM
I think it would be much better to find the source of the errors and tackle the problem that way rather than through a bunch of empty columns into various tables.

Opserty
11-27-2007, 02:38 PM
I was going to say something but then I realised the two people above me said exactly what I was thinking. :p