MySQL: Field 'ext_num' doesn't have a default value

Технические вопросы по UTM 5.0
Ответить
xxxupg
Сообщения: 457
Зарегистрирован: Вс май 02, 2010 10:00

MySQL: Field 'ext_num' doesn't have a default value

Сообщение xxxupg »

?Debug : Aug 01 08:36:48 DBCtx: <34455785> SQL query: INSERT INTO invoices(invoice_date,uid,account_id,arrearage,period_start,period_end,balance_on_set,version) VALUES('1343795808','7805','7887','0','1341090025','1343767105','2.296474121976644e-011','1')
?Debug : Aug 01 08:36:48 DBCtx: <34455785> MySQL query failed:<Field 'ext_num' doesn't have a default value> Trying to reconnect: 0
?Debug : Aug 01 08:36:50 DBCtx: <34455785> MySQL query failed:<Field 'ext_num' doesn't have a default value> Trying to reconnect: 1
?Debug : Aug 01 08:36:52 DBCtx: <34455785> MySQL query failed:<Field 'ext_num' doesn't have a default value> Trying to reconnect: 2
?Debug : Aug 01 08:36:54 DBCtx: <34455785> MySQL query failed:<Field 'ext_num' doesn't have a default value> Trying to reconnect: 3
?Debug : Aug 01 08:36:56 DBCtx: <34455785> MySQL query failed:<Field 'ext_num' doesn't have a default value> Trying to reconnect: 4
было ли у кого и как можно побороть такое?
p.s. Таблица invoices пуста.

Аватара пользователя
Magnum72
Сообщения: 1947
Зарегистрирован: Чт сен 22, 2005 06:54
Контактная информация:

Re: MySQL: Field 'ext_num' doesn't have a default value

Сообщение Magnum72 »

xxxupg писал(а):
?Debug : Aug 01 08:36:48 DBCtx: <34455785> SQL query: INSERT INTO invoices(invoice_date,uid,account_id,arrearage,period_start,period_end,balance_on_set,version) VALUES('1343795808','7805','7887','0','1341090025','1343767105','2.296474121976644e-011','1')
?Debug : Aug 01 08:36:48 DBCtx: <34455785> MySQL query failed:<Field 'ext_num' doesn't have a default value> Trying to reconnect: 0
?Debug : Aug 01 08:36:50 DBCtx: <34455785> MySQL query failed:<Field 'ext_num' doesn't have a default value> Trying to reconnect: 1
?Debug : Aug 01 08:36:52 DBCtx: <34455785> MySQL query failed:<Field 'ext_num' doesn't have a default value> Trying to reconnect: 2
?Debug : Aug 01 08:36:54 DBCtx: <34455785> MySQL query failed:<Field 'ext_num' doesn't have a default value> Trying to reconnect: 3
?Debug : Aug 01 08:36:56 DBCtx: <34455785> MySQL query failed:<Field 'ext_num' doesn't have a default value> Trying to reconnect: 4
было ли у кого и как можно побороть такое?
p.s. Таблица invoices пуста.

Думаю баг, побороть можно если изменить структуру таблицы и поставить как дефолтное значение у ext_num: 0 или ''

xxxupg
Сообщения: 457
Зарегистрирован: Вс май 02, 2010 10:00

Re: MySQL: Field 'ext_num' doesn't have a default value

Сообщение xxxupg »

Magnum72 писал(а):Думаю баг, побороть можно если изменить структуру таблицы и поставить как дефолтное значение у ext_num: 0 или ''
так исправить?

Код: Выделить всё

-- ----------------------------
-- Table structure for invoices_copy
-- ----------------------------
CREATE TABLE `invoices_copy` &#40;
  `id` int&#40;11&#41; NOT NULL AUTO_INCREMENT,
  `ext_num` varchar&#40;255&#41; NOT NULL DEFAULT '0',
  `invoice_date` int&#40;11&#41; NOT NULL DEFAULT '0',
  `payment_transaction_id` int&#40;11&#41; NOT NULL DEFAULT '0',
  `expire_date` int&#40;11&#41; NOT NULL DEFAULT '0',
  `is_payed` int&#40;11&#41; NOT NULL DEFAULT '0',
  `is_printed` int&#40;11&#41; NOT NULL DEFAULT '0',
  `is_mailed` int&#40;11&#41; NOT NULL DEFAULT '0',
  `uid` int&#40;11&#41; NOT NULL DEFAULT '0',
  `account_id` int&#40;11&#41; NOT NULL DEFAULT '0',
  `arrearage` double NOT NULL DEFAULT '0',
  `period_start` int&#40;11&#41; NOT NULL DEFAULT '0',
  `period_end` int&#40;11&#41; NOT NULL DEFAULT '0',
  `balance_on_set` double NOT NULL DEFAULT '0',
  `version` int&#40;11&#41; NOT NULL DEFAULT '0',
  `ic_status` int&#40;11&#41; NOT NULL DEFAULT '0',
  `ic_id` varchar&#40;255&#41; NOT NULL DEFAULT '',
  `last_sync_date` int&#40;11&#41; NOT NULL DEFAULT '0',
  PRIMARY KEY &#40;`id`&#41;
&#41; ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records 
-- ----------------------------
И еще вопрос, у Вас эта таблица вообще заполняется?

Ответить