Page 1 of 1

[Solved]Database server table error

PostPosted: Sun Nov 25, 2007 9:12 am
Author: krillmeed
Your phpBB Version: 2.0.22
phpBB Type: Integramod 141
MODs: Yes
Your knowledge: Basic Knowledge
Board URL: http://krillmeed.com/forum/index.php

PHP Version: php-5.2.3
MySQL Version: MySQL-5.0.41


What was done before the problem appeared?
Moving database to new server


What was done to try to solve the problem?




De.scription and Message

I have been moving my database to a new server, there was a lot of problems, but most have been fixed. The only one i cannot figure out is the groups table. This is what i try to put in:
DROP TABLE IF EXISTS `trek_groups`;

CREATE TABLE IF NOT EXISTS `trek_groups`(`group_id` MEDIUMINT(8) NOT NULL AUTO_INCREMENT PRIMARY KEY, `group_type` TINYINT(4) NOT NULL DEFAULT 1, `group_name` VARCHAR(40) NOT NULL, `group_de.scription` VARCHAR(255) NOT NULL, `group_moderator` MEDIUMINT(8) NOT NULL DEFAULT 0, `group_single_user` TINYINT(1) NOT NULL DEFAULT 1, `group_count` INT(4) UNSIGNED NULL DEFAULT 99999999, `group_count_max` INT(4) UNSIGNED NULL DEFAULT 99999999, `group_count_enable` SMALLINT(2) UNSIGNED NULL DEFAULT 0, `group_amount` FLOAT(12,31) NULL DEFAULT 0, `group_period` INT(11) NULL DEFAULT 1, `group_period_basis` VARCHAR(10) NULL DEFAULT 'M', `group_first_trial_fee` FLOAT(12,31) NULL DEFAULT 0, `group_first_trial_period` INT(11) NULL DEFAULT 0, `group_first_trial_period_basis` VARCHAR(10) NULL DEFAULT '0', `group_second_trial_fee` FLOAT(12,31) NULL DEFAULT 0, `group_second_trial_period` INT(11) NULL DEFAULT 0, `group_second_trial_period_basis` VARCHAR(10) NULL DEFAULT '0', `group_sub_recurring` INT(11) NULL DEFAULT 1, `group_sub_recurring_stop` INT(11) NULL DEFAULT 0, `group_sub_recurring_stop_num` INT(11) NULL DEFAULT 0, `group_sub_reattempt` INT(11) NULL DEFAULT 1, `group_allow_weblogs` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0)TYPE=MyISAM;

LOCK TABLES `trek_groups` WRITE;


But when i do, this is what i get:

MySQL said:

#1425 - Too big scale 31 specified for column 'group_amount'. Maximum is 30.

when i change the values from 31 to 30, this is what i get:

MySQL said:

#1427 - For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 'group_amount').

This did work on my old server, does anyone have any idea of a fix? Without it everything else is lost :(

Re: Database server table error

PostPosted: Sun Nov 25, 2007 12:43 pm
Author: Helter

PostPosted: Sun Nov 25, 2007 10:48 pm
Author: krillmeed
looks like something if i host the mysql, even my server just tells me about the error, even though i mentioned it to them. Seems i could end up losing 2 years work here.

Re: Database server table error

PostPosted: Mon Nov 26, 2007 1:16 am
Author: Helter
I just ran this successfully on one of my db's

Code: Select all
 -- -- Table structure for table 'trek_groups'--  CREATE TABLE trek_groups (   group_id mediumint(8) NOT NULL auto_increment,   group_type tinyint(4) NOT NULL default '1',   group_name varchar(40) NOT NULL default '',   group_de.scription varchar(255) NOT NULL default '',   group_moderator mediumint(8) NOT NULL default '0',   group_single_user tinyint(1) NOT NULL default '1',   group_count int(4) unsigned default '99999999',   group_count_max int(4) unsigned default '99999999',   group_count_enable smallint(2) unsigned default '0',   group_amount float(31,30) default '0.000000000000000000000000000000',   group_period int(11) default '1',   group_period_basis varchar(10) default 'M',   group_first_trial_fee float(31,30) default '0.000000000000000000000000000000',   group_first_trial_period int(11) default '0',   group_first_trial_period_basis varchar(10) default '0',   group_second_trial_fee float(31,30) default '0.000000000000000000000000000000',   group_second_trial_period int(11) default '0',   group_second_trial_period_basis varchar(10) default '0',   group_sub_recurring int(11) default '1',   group_sub_recurring_stop int(11) default '0',   group_sub_recurring_stop_num int(11) default '0',   group_sub_reattempt int(11) default '1',   group_allow_weblogs tinyint(1) unsigned NOT NULL default '0',   PRIMARY KEY  (group_id)) ENGINE=MyISAM;  -- -- Dumping data for table 'trek_groups'--  

PostPosted: Mon Nov 26, 2007 9:52 am
Author: krillmeed
Thankyou sir, this worked a treat, i will open up a new post for the last problem. Thank you once again